MRPT logo

mrpt::utils::CReferencedMemBlock Class Reference

Represents a memory block (via "void*") that can be shared between several objects through copy operator (=). More...

#include <mrpt/utils/CReferencedMemBlock.h>

Inheritance diagram for mrpt::utils::CReferencedMemBlock:

stlplus::smart_ptr< vector_byte > stlplus::smart_ptr_base< vector_byte, constructor_copy< vector_byte > >

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


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.

Definition at line 41 of file CReferencedMemBlock.h.


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 (  )  const [inline]

Definition at line 66 of file CReferencedMemBlock.h.

References MRPT_TRY_END, MRPT_TRY_START, and THROW_EXCEPTION.

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

Definition at line 53 of file CReferencedMemBlock.h.

References MRPT_TRY_END, MRPT_TRY_START, and THROW_EXCEPTION.

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

Resize the shared memory block.




Page generated by Doxygen 1.5.8 for MRPT 0.6.5 SVN: at Thu Feb 26 02:07:47 EST 2009