#include <counted_ptr.h>
Classes | |
class | counter |
Public Types | |
typedef _Tp | element_type |
Public Member Functions | |
counted_ptr (_Tp *p=0) | |
~counted_ptr () | |
counted_ptr (const counted_ptr &r) throw () | |
counted_ptr & | operator= (const counted_ptr &r) |
counted_ptr & | operator= (element_type *r) |
template<typename _Tq > | |
counted_ptr (const counted_ptr< _Tq > &r) throw () | |
template<typename _Tq > | |
counted_ptr & | operator= (const counted_ptr< _Tq > &r) |
_Tp & | operator* () const throw () |
_Tp * | operator-> () const throw () |
_Tp * | get () const throw () |
bool | is_unique () const throw () |
Definition at line 39 of file counted_ptr.h.
typedef _Tp counted_ptr< _Tp >::element_type |
The element type of the counted pointer
Definition at line 63 of file counted_ptr.h.
counted_ptr< _Tp >::counted_ptr | ( | _Tp * | p = 0 |
) | [inline, explicit] |
The constructor allocates a new counter object, at least if is
non-NULL.
Definition at line 68 of file counted_ptr.h.
counted_ptr< _Tp >::~counted_ptr | ( | ) | [inline] |
The Standard Destructor just deletes this reference to the counted object.
Definition at line 72 of file counted_ptr.h.
counted_ptr< _Tp >::counted_ptr | ( | const counted_ptr< _Tp > & | r | ) | throw () [inline] |
The Copy Constructor gets a new reference to the counted object.
Definition at line 75 of file counted_ptr.h.
counted_ptr< _Tp >::counted_ptr | ( | const counted_ptr< _Tq > & | r | ) | throw () [inline] |
The constructor allocates a new counter object.
Definition at line 105 of file counted_ptr.h.
_Tp* counted_ptr< _Tp >::get | ( | ) | const throw () [inline] |
This is a safeguarded pointer operator
Definition at line 135 of file counted_ptr.h.
bool counted_ptr< _Tp >::is_unique | ( | ) | const throw () [inline] |
This checks whether the object has only this (unique) reference.
Definition at line 138 of file counted_ptr.h.
_Tp& counted_ptr< _Tp >::operator* | ( | ) | const throw () [inline] |
This is the dereferentiation operator
Definition at line 129 of file counted_ptr.h.
_Tp* counted_ptr< _Tp >::operator-> | ( | ) | const throw () [inline] |
This is the pointer operator
Definition at line 132 of file counted_ptr.h.
counted_ptr& counted_ptr< _Tp >::operator= | ( | const counted_ptr< _Tq > & | r | ) | [inline] |
The Assignment Operator first deletes the reference for the object this counted_ptr points at and then gets a new reference for the assigned object.
Definition at line 112 of file counted_ptr.h.
counted_ptr& counted_ptr< _Tp >::operator= | ( | element_type * | r | ) | [inline] |
This Assignment Operator explicitly sets a new element_type pointer.
Definition at line 92 of file counted_ptr.h.
counted_ptr& counted_ptr< _Tp >::operator= | ( | const counted_ptr< _Tp > & | r | ) | [inline] |
The Assignment Operator first deletes the reference for the object this counted_ptr points at and then gets a new reference for the assigned object.
Definition at line 81 of file counted_ptr.h.