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 27 of file CReferencedMemBlock.h.
#include <mrpt/utils/CReferencedMemBlock.h>
Public Types | |
typedef std::vector< char > | value_type |
typedef std::vector< char > & | reference |
typedef constructor_copy< std::vector< char > > | value_copy |
Public Member Functions | |
CReferencedMemBlock (size_t mem_block_size=0) | |
Constructor with an optional size of the memory block. More... | |
virtual | ~CReferencedMemBlock () |
Destructor, calls dereference_once. More... | |
void | resize (size_t mem_block_size) |
Resize the shared memory block. More... | |
template<class T > | |
T | getAs () |
template<class T > | |
T | getAs () const |
operator bool (void) const | |
bool | operator! (void) const |
bool | present (void) const |
bool | null (void) const |
std::vector< char > & | operator* (void) throw (null_dereference) |
const std::vector< char > & | operator* (void) const throw (null_dereference) |
std::vector< char > * | operator-> (void) throw (null_dereference) |
const std::vector< char > * | operator-> (void) const throw (null_dereference) |
void | set_value (const std::vector< char > &data) throw (illegal_copy) |
std::vector< char > & | value (void) throw (null_dereference) |
const std::vector< char > & | value (void) const throw (null_dereference) |
void | set (std::vector< char > *data=0) |
std::vector< char > * | pointer (void) |
const std::vector< char > * | pointer (void) const |
void | alias (const smart_ptr_base< std::vector< char >, constructor_copy< std::vector< char > >, mrpt::synch::CAtomicCounter > &) |
bool | aliases (const smart_ptr_base< std::vector< char >, constructor_copy< std::vector< char > >, 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< std::vector< char >, constructor_copy< std::vector< char > >, mrpt::synch::CAtomicCounter > &) throw (illegal_copy) |
void * | handle (void) const |
void | make_alias (void *handle) |
Public Attributes | |
const typedef std::vector< char > & | const_reference |
Protected Attributes | |
smart_ptr_holder< std::vector< char >, mrpt::synch::CAtomicCounter > * | m_holder |
Private Types | |
typedef stlplus::smart_ptr< std::vector< char > > | base_t |
|
private |
Definition at line 29 of file CReferencedMemBlock.h.
|
inherited |
Definition at line 71 of file smart_ptr.hpp.
|
inherited |
Definition at line 73 of file smart_ptr.hpp.
|
inherited |
Definition at line 70 of file smart_ptr.hpp.
mrpt::utils::CReferencedMemBlock::CReferencedMemBlock | ( | size_t | mem_block_size = 0 | ) |
Constructor with an optional size of the memory block.
|
virtual |
Destructor, calls dereference_once.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inherited |
|
inline |
Definition at line 40 of file CReferencedMemBlock.h.
References empty().
|
inline |
Definition at line 51 of file CReferencedMemBlock.h.
References empty().
|
inherited |
|
inherited |
|
inlineinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
void mrpt::utils::CReferencedMemBlock::resize | ( | size_t | mem_block_size | ) |
Resize the shared memory block.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Definition at line 72 of file smart_ptr.hpp.
|
protectedinherited |
Definition at line 175 of file smart_ptr.hpp.
Page generated by Doxygen 1.8.16 for MRPT 1.4.0 SVN: at Mon Oct 14 22:32:58 UTC 2019 |