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 }
stlplus::smart_ptr< std::vector< char > > m_data
CReferencedMemBlock(size_t mem_block_size=0)
Constructor with an optional size of the memory block.
void clear()
Frees the underlying memory block.
void resize(size_t mem_block_size)
Resize the shared memory block.
virtual ~CReferencedMemBlock()
Destructor, calls dereference_once.
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values,...
Definition: zip.h:16



Page generated by Doxygen 1.9.1 for MRPT 1.5.6 Git: 4c65e8431 Tue Apr 24 08:18:17 2018 +0200 at mar 26 may 2026 13:06:43 CEST