Main MRPT website > C++ reference
MRPT logo
Public Types | Public Member Functions | Protected Attributes
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.

Definition at line 42 of file CReferencedMemBlock.h.

#include <mrpt/utils/CReferencedMemBlock.h>

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

List of all members.

Public Types

typedef vector_byte value_type
typedef vector_bytereference
typedef const vector_byteconst_reference
typedef constructor_copy
< vector_byte
value_copy

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
 operator bool (void) const
bool operator! (void) const
bool present (void) const
bool null (void) const
vector_byteoperator* (void) throw (null_dereference)
const vector_byteoperator* (void) const throw (null_dereference)
vector_byteoperator-> (void) throw (null_dereference)
const vector_byteoperator-> (void) const throw (null_dereference)
void set_value (const vector_byte &data) throw (illegal_copy)
vector_bytevalue (void) throw (null_dereference)
const vector_bytevalue (void) const throw (null_dereference)
void set (vector_byte *data=0)
vector_bytepointer (void)
const vector_bytepointer (void) const
void alias (const smart_ptr_base< vector_byte, constructor_copy< vector_byte >, mrpt::synch::CAtomicCounter > &)
bool aliases (const smart_ptr_base< vector_byte, constructor_copy< vector_byte >, mrpt::synch::CAtomicCounter > &) const
unsigned alias_count (void) const
void clear (void)
void clear_unique (void)
void make_unique (void) throw (illegal_copy)
void copy (const smart_ptr_base< vector_byte, constructor_copy< vector_byte >, mrpt::synch::CAtomicCounter > &) throw (illegal_copy)
void * handle (void) const
void make_alias (void *handle)

Protected Attributes

smart_ptr_holder< vector_byte,
mrpt::synch::CAtomicCounter > * 
m_holder

Member Typedef Documentation

Definition at line 112 of file CColouredPointsMap.h.

Definition at line 111 of file CColouredPointsMap.h.

typedef constructor_copy< vector_byte > mrpt::stlplus::smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter >::value_copy [inherited]

Definition at line 113 of file CColouredPointsMap.h.

Definition at line 110 of file CColouredPointsMap.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

unsigned mrpt::stlplus::smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter >::alias_count ( void  ) const [inline, inherited]
void mrpt::stlplus::smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter >::clear ( void  ) [inline, inherited]
void mrpt::stlplus::smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter >::clear_unique ( void  ) [inline, inherited]
void mrpt::stlplus::smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter >::copy ( const smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter > &  ) throw (illegal_copy) [inherited]
template<class T >
T mrpt::utils::CReferencedMemBlock::getAs ( ) [inline]

Definition at line 54 of file CReferencedMemBlock.h.

References empty(), and THROW_EXCEPTION.

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

Definition at line 65 of file CReferencedMemBlock.h.

References empty(), and THROW_EXCEPTION.

void* mrpt::stlplus::smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter >::handle ( void  ) const [inherited]
void mrpt::stlplus::smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter >::make_alias ( void *  handle) [inherited]
void mrpt::stlplus::smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter >::make_unique ( void  ) throw (illegal_copy) [inline, inherited]
bool mrpt::stlplus::smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter >::null ( void  ) const [inherited]
mrpt::stlplus::smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter >::operator bool ( void  ) const [inherited]
bool mrpt::stlplus::smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter >::operator! ( void  ) const [inherited]
const vector_byte & mrpt::stlplus::smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter >::operator* ( void  ) const throw (null_dereference) [inherited]
vector_byte & mrpt::stlplus::smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter >::operator* ( void  ) throw (null_dereference) [inherited]
vector_byte * mrpt::stlplus::smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter >::operator-> ( void  ) throw (null_dereference) [inherited]
const vector_byte * mrpt::stlplus::smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter >::operator-> ( void  ) const throw (null_dereference) [inherited]
vector_byte * mrpt::stlplus::smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter >::pointer ( void  ) [inherited]
const vector_byte * mrpt::stlplus::smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter >::pointer ( void  ) const [inherited]
bool mrpt::stlplus::smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter >::present ( void  ) const [inherited]
void mrpt::utils::CReferencedMemBlock::resize ( size_t  mem_block_size)

Resize the shared memory block.

void mrpt::stlplus::smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter >::set ( vector_byte data = 0) [inherited]
void mrpt::stlplus::smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter >::set_value ( const vector_byte data) throw (illegal_copy) [inherited]
vector_byte & mrpt::stlplus::smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter >::value ( void  ) throw (null_dereference) [inherited]
const vector_byte & mrpt::stlplus::smart_ptr_base< vector_byte , constructor_copy< vector_byte > , mrpt::synch::CAtomicCounter >::value ( void  ) const throw (null_dereference) [inherited]

Member Data Documentation

Definition at line 215 of file CColouredPointsMap.h.




Page generated by Doxygen 1.7.4 for MRPT 0.9.5 SVN:2717 at Sun Oct 16 16:08:03 PDT 2011 Hosted on:
SourceForge.net Logo