#include <shared_ptr.h>
Public Member Functions | |
shared_ptr () | |
Creates an empty shared_ptr - one that doesn't point anywhere. | |
shared_ptr (T *p) | |
shared_ptr (const shared_ptr< T > &other) | |
template<typename U > | |
shared_ptr (const shared_ptr< U > &other) | |
shared_ptr & | operator= (const shared_ptr &other) |
T * | get () |
T * | operator-> () |
T & | operator* () |
const T * | get () const |
const T * | operator-> () const |
const T & | operator* () const |
bool | unique () const |
long | use_count () const |
operator bool () const | |
void | swap (shared_ptr &other) |
Friends | |
class | shared_ptr |
bdm::shared_ptr< T >::shared_ptr | ( | T * | p | ) | [inline] |
Constructs a shared_ptr that owns the pointer p (unless p is null, in which case this constructor creates an empty shared_ptr).
bdm::shared_ptr< T >::shared_ptr | ( | const shared_ptr< T > & | other | ) | [inline] |
If other is empty, constructs an empty shared_ptr; otherwise, constructs a shared_ptr that shares ownership with other.
bdm::shared_ptr< T >::shared_ptr | ( | const shared_ptr< U > & | other | ) | [inline] |
If other is empty, constructs an empty shared_ptr; otherwise, constructs a shared_ptr that shares ownership with other.
const T* bdm::shared_ptr< T >::get | ( | ) | const [inline] |
Returns the stored pointer (which remains owned by this instance).
T* bdm::shared_ptr< T >::get | ( | ) | [inline] |
Returns the stored pointer (which remains owned by this instance).
const T& bdm::shared_ptr< T >::operator* | ( | ) | const [inline] |
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] |
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] |
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] |
Returns the stored pointer (which remains owned by this instance). This method may only be called when the stored pointer isn't NULL.