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 const std::vector< char > & | const_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) |
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 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 |
|
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 | ||||||||||||||
|
protectedinherited |
Definition at line 175 of file smart_ptr.hpp.
| Page generated by Doxygen 1.8.12 for MRPT 1.3.2 SVN: at Mon Oct 3 19:22:36 UTC 2016 |