Main MRPT website > C++ reference
MRPT logo
Public Member Functions
mrpt::utils::CReferencedMemBlock Class Reference

Detailed Description

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.

#include <mrpt/utils/CReferencedMemBlock.h>

Inheritance diagram for mrpt::utils::CReferencedMemBlock:
Inheritance graph
[legend]

List of all members.

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 >
getAs ()
template<class T >
getAs () const

Constructor & Destructor Documentation

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.


Member Function Documentation

template<class T >
T mrpt::utils::CReferencedMemBlock::getAs ( ) [inline]

Definition at line 54 of file CReferencedMemBlock.h.

References THROW_EXCEPTION, and empty().

template<class T >
T mrpt::utils::CReferencedMemBlock::getAs ( ) const [inline]

Definition at line 65 of file CReferencedMemBlock.h.

References THROW_EXCEPTION, and empty().

void mrpt::utils::CReferencedMemBlock::resize ( size_t  mem_block_size)

Resize the shared memory block.




Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011