#include <shared_ptr.h>
Public Member Functions | |
| object_ptr () | |
| Default constructor. | |
| object_ptr (const shared_ptr< T > &b) | |
| Upcast from shared_ptr<T> to object_ptr<T>. | |
| object_ptr (T *p) | |
| object_ptr< T > & | operator= (const object_ptr< T > &other) |
| T * | get () |
| const T * | get () const |
| T * | operator-> () |
| const T * | operator-> () const |
| T & | operator* () |
| const T & | operator* () const |
| bool | unique () const |
| long | use_count () const |
| operator bool () const | |
| void | swap (shared_ptr &other) |
T must have a default constructor.
Note that shared_ptr's destructor isn't virtual - don't call delete on pointers to instances of this class.
| bdm::object_ptr< T >::object_ptr | ( | ) | [inline] |
Default constructor.
Calls T's default constructor.
| bdm::object_ptr< T >::object_ptr | ( | const shared_ptr< T > & | b | ) | [inline] |
Upcast from shared_ptr<T> to object_ptr<T>.
| b | The shared pointer, which must not be empty. |
| bdm::object_ptr< T >::object_ptr | ( | T * | p | ) | [inline] |
Constructs an object_ptr that owns the pointer p. p must have been alllocated by new!
| const T * bdm::shared_ptr< T >::get | ( | ) | const [inline, inherited] |
Returns the stored pointer (which remains owned by this instance).
| T * bdm::shared_ptr< T >::get | ( | ) | [inline, inherited] |
Returns the stored pointer (which remains owned by this instance).
| const T & bdm::shared_ptr< T >::operator* | ( | ) | const [inline, inherited] |
Returns a reference to the object pointed to by the stored pointer. This method may only be called when the stored pointer isn't NULL.
| T & bdm::shared_ptr< T >::operator* | ( | ) | [inline, inherited] |
Returns a reference to the object pointed to by the stored pointer. This method may only be called when the stored pointer isn't NULL.
| const T * bdm::shared_ptr< T >::operator-> | ( | ) | const [inline, inherited] |
Returns the stored pointer (which remains owned by this instance). This method may only be called when the stored pointer isn't NULL.
| T * bdm::shared_ptr< T >::operator-> | ( | ) | [inline, inherited] |
Returns the stored pointer (which remains owned by this instance). This method may only be called when the stored pointer isn't NULL.
1.5.8