cgma
|
#include <TDUPtr.hpp>
Public Member Functions | |
TDUPtr () | |
TDUPtr (T *ptr) | |
TDUPtr (const TDUPtr< T > ©) | |
virtual | ~TDUPtr () |
T & | operator* () const |
T * | operator-> () const |
operator bool () const | |
TDUPtr< T > & | operator= (const TDUPtr< T > ©) |
TDUPtr< T > & | operator= (T *ptr) |
bool | operator== (const TDUPtr< T > &other) const |
bool | operator!= (const TDUPtr< T > &other) const |
bool | operator== (const T *ptr) const |
bool | operator!= (const T *ptr) const |
void | change_ptr (T *ptr) |
T * | ptr () const |
Private Member Functions | |
virtual void | nullify () |
Private Attributes | |
T * | ptrTo |
Definition at line 57 of file TDUPtr.hpp.
Definition at line 61 of file TDUPtr.hpp.
: ptrTo(0) {}
Definition at line 63 of file TDUPtr.hpp.
: ptrTo(0) { change_ptr(ptr); }
Definition at line 66 of file TDUPtr.hpp.
: TDUPtrListNode(), ptrTo(0) { change_ptr(copy.ptrTo); }
Definition at line 69 of file TDUPtr.hpp.
{ change_ptr(0); }
void TDUPtr< T >::change_ptr | ( | T * | ptr | ) | [inline] |
Definition at line 124 of file TDUPtr.hpp.
{ if( ptr != ptrTo ) { TDPtr::remove_from_TD(this, ptrTo); ptrTo = ptr; TDPtr::add_to_TD(this, ptrTo); } }
TDUPtr< T >::operator bool | ( | ) | const [inline] |
Definition at line 74 of file TDUPtr.hpp.
{ return ptrTo != 0; }
Definition at line 84 of file TDUPtr.hpp.
bool TDUPtr< T >::operator!= | ( | const T * | ptr | ) | const [inline] |
Definition at line 88 of file TDUPtr.hpp.
T& TDUPtr< T >::operator* | ( | ) | const [inline] |
Definition at line 72 of file TDUPtr.hpp.
{ return *ptrTo; }
T* TDUPtr< T >::operator-> | ( | ) | const [inline] |
Definition at line 73 of file TDUPtr.hpp.
{ return ptrTo; }
Definition at line 76 of file TDUPtr.hpp.
{ change_ptr(copy.ptrTo); return *this; }
Definition at line 79 of file TDUPtr.hpp.
{ change_ptr(ptr); return *this; }
Definition at line 82 of file TDUPtr.hpp.
bool TDUPtr< T >::operator== | ( | const T * | ptr | ) | const [inline] |
Definition at line 86 of file TDUPtr.hpp.
Definition at line 93 of file TDUPtr.hpp.
{ return ptrTo; }
Definition at line 101 of file TDUPtr.hpp.