Main MRPT website > C++ reference for MRPT 1.5.5
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 {
23 }
24 
25 void CReferencedMemBlock::resize(size_t mem_block_size)
26 {
27  m_data->resize(mem_block_size);
28 }
29 
30 unsigned int CReferencedMemBlock::alias_count() const
31 {
32  return m_data.alias_count();
33 }
34 
36 {
37  m_data.clear();
38 }
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
Definition: zip.h:16
void resize(size_t mem_block_size)
Resize the shared memory block.
STL namespace.
void clear()
Frees the underlying memory block.
CReferencedMemBlock(size_t mem_block_size=0)
Constructor with an optional size of the memory block.
stlplus::smart_ptr< std::vector< char > > m_data
virtual ~CReferencedMemBlock()
Destructor, calls dereference_once.



Page generated by Doxygen 1.8.14 for MRPT 1.5.5 Git: e06b63dbf Fri Dec 1 14:41:11 2017 +0100 at lun oct 28 01:31:35 CET 2019