Main MRPT website > C++ reference for MRPT 1.5.6
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 }
void resize(size_t mem_block_size)
Resize the shared memory block.
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.6 for MRPT 1.5.6 Git: 4c65e84 Tue Apr 24 08:18:17 2018 +0200 at mar abr 24 08:26:17 CEST 2018