Main MRPT website > C++ reference for MRPT 1.9.9
CReferencedMemBlock.cpp
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 #include "base-precomp.h" // Precompiled headers
11 
13 
14 using namespace mrpt::utils;
15 
17  : m_data(new std::vector<char>(mem_block_size))
18 {
19 }
20 
22 void CReferencedMemBlock::resize(size_t mem_block_size)
23 {
24  m_data->resize(mem_block_size);
25 }
26 
28 {
29  return m_data.use_count();
30 }
31 
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
void resize(size_t mem_block_size)
Resize the shared memory block.
STL namespace.
void clear()
Frees the underlying memory block.
std::shared_ptr< std::vector< char > > m_data
CReferencedMemBlock(size_t mem_block_size=0)
Constructor with an optional size of the memory block.
virtual ~CReferencedMemBlock()
Destructor, calls dereference_once.



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019