Represents a memory block (via "void*") that can be shared between several objects through copy operator (=).
It keeps the reference count and only when it comes to zero, the memory block is really freed.
Definition at line 41 of file CReferencedMemBlock.h.
#include <mrpt/utils/CReferencedMemBlock.h>
Public Member Functions | |
CReferencedMemBlock (size_t mem_block_size=0) | |
Constructor with an optional size of the memory block. | |
virtual | ~CReferencedMemBlock () |
Destructor, calls dereference_once. | |
void | resize (size_t mem_block_size) |
Resize the shared memory block. | |
template<class T > | |
T | getAs () |
template<class T > | |
T | getAs () const |
mrpt::utils::CReferencedMemBlock::CReferencedMemBlock | ( | size_t | mem_block_size = 0 | ) |
Constructor with an optional size of the memory block.
virtual mrpt::utils::CReferencedMemBlock::~CReferencedMemBlock | ( | ) | [virtual] |
Destructor, calls dereference_once.
T mrpt::utils::CReferencedMemBlock::getAs | ( | ) | [inline] |
Definition at line 53 of file CReferencedMemBlock.h.
References empty(), and THROW_EXCEPTION.
T mrpt::utils::CReferencedMemBlock::getAs | ( | ) | const [inline] |
Definition at line 64 of file CReferencedMemBlock.h.
References empty(), and THROW_EXCEPTION.
void mrpt::utils::CReferencedMemBlock::resize | ( | size_t | mem_block_size | ) |
Resize the shared memory block.
Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN: at Sat Mar 26 06:40:17 UTC 2011 |