boost::node_ptr
// In header: <boost/smart_ptr/root_ptr.hpp> template<typename T> class node_ptr : public smart_ptr::detail::node_ptr_base< T > { public: // types typedef T value_type; // construct/copy/destruct explicit node_ptr(node_proxy const &); template<typename V, typename PoolAllocator> explicit node_ptr(node_proxy const &, node< V, PoolAllocator > *); template<typename V> node_ptr(node_ptr< V > const &); node_ptr(node_ptr< T > const &); template<typename V> node_ptr& operator=(node_ptr< V > const &); node_ptr& operator=(node_ptr< T > const &); template<typename V, typename PoolAllocator> node_ptr& operator=(node< V, PoolAllocator > *); ~node_ptr(); // public member functions template<typename V> void reset(node_ptr< V > const &); template<typename V, typename PoolAllocator> void reset(node< V, PoolAllocator > *); bool cyclic() const; };
Deterministic region based memory manager.
Complete memory management utility on top of standard reference counting.
Note | |
---|---|
Must be initialized with a reference to a |
node_ptr
public
construct/copy/destructexplicit node_ptr(node_proxy const & x);
Initialization of a pointer.
Parameters: |
|
template<typename V, typename PoolAllocator> explicit node_ptr(node_proxy const & x, node< V, PoolAllocator > * p);
Initialization of a pointer.
Parameters: |
|
template<typename V> node_ptr(node_ptr< V > const & p);
Initialization of a pointer.
Parameters: |
|
node_ptr(node_ptr< T > const & p);
Initialization of a pointer.
Parameters: |
|
template<typename V> node_ptr& operator=(node_ptr< V > const & p);
Assignment.
Parameters: |
|
node_ptr& operator=(node_ptr< T > const & p);
Assignment.
Parameters: |
|
template<typename V, typename PoolAllocator> node_ptr& operator=(node< V, PoolAllocator > * p);
Assignment.
Parameters: |
|
~node_ptr();
Destructor.
node_ptr
public member functionstemplate<typename V> void reset(node_ptr< V > const & p);
Assignment.
Parameters: |
|
template<typename V, typename PoolAllocator> void reset(node< V, PoolAllocator > * p);
Assignment.
Parameters: |
|
bool cyclic() const;
Explicit cyclicism detection mechanism, for use only inside destructors.
TODO I'm not sure what this means??? return if there is an object to destroy? Need a link to the example here See root_ptr_example1.cpp for an unfinished on.
Returns: |
Whether the pointer inside a destructor points to an object already destroyed. |