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 T | value_type |
typedef T & | reference |
typedef const T & | const_reference |
typedef C | 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 > | |
T | getAs () |
template<class T > | |
T | getAs () const |
operator bool (void) const | |
bool | operator! (void) const |
bool | present (void) const |
bool | null (void) const |
T & | operator* (void) throw (null_dereference) |
const T & | operator* (void) const throw (null_dereference) |
T * | operator-> (void) throw (null_dereference) |
const T * | operator-> (void) const throw (null_dereference) |
void | set_value (const T &data) throw (illegal_copy) |
T & | value (void) throw (null_dereference) |
const T & | value (void) const throw (null_dereference) |
void | set (T *data=0) |
T * | pointer (void) |
const T * | pointer (void) const |
void | alias (const smart_ptr_base< T, C, COUNTER > &) |
bool | aliases (const smart_ptr_base< T, C, COUNTER > &) 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< T, C, COUNTER > &) throw (illegal_copy) |
void * | handle (void) const |
void | make_alias (void *handle) |
Protected Attributes | |
smart_ptr_holder< T, COUNTER > * | 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 72 of file smart_ptr.hpp.
|
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 |
Referenced by std::operator!=(), and std::operator==().
|
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 |
Referenced by mrpt::utils::metaprogramming::ObjectMakeUnique::operator()().
|
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 |
|
protectedinherited |
Definition at line 175 of file smart_ptr.hpp.
Page generated by Doxygen 1.9.7 for MRPT 1.4.0 SVN: at Tue Jun 27 17:12:06 UTC 2023 |