Handle dynamical object creation and pointer affectation. More...
#include <TReference.hxx>
Public Member Functions | |
Reference_ptr (T *p=0) | |
Normal constructor. More... | |
Reference_ptr (const Reference_ptr &r) | |
Copy constructor. More... | |
~Reference_ptr () | |
Normal destructor. More... | |
T & | operator* () const |
return the object of the template class More... | |
T * | operator-> () const |
return a pointer to the template class More... | |
T * | Get () const |
return a pointer to the template class (usefull for cast) More... | |
Reference_ptr & | operator= (const Reference_ptr &r) |
Affectation ; destroy old ptr if is no more referenced. More... | |
Reference_ptr & | operator= (T *p) |
Affectation ; destroy old ptr if is no more referenced. More... | |
bool | operator== (T *p) |
Comparaison of Pointer. More... | |
bool | operator!= (T *p) |
Comparaison of Pointer. More... | |
Private Attributes | |
T * | ptr |
Pointer to the template class T. More... | |
Handle dynamical object creation and pointer affectation.
It adds TReference to an objet when created and destroy an object only when there is no more TReference on it. A Reference_ptr contain a pointer to the template class.
|
inlineexplicit |
Normal constructor.
|
inline |
Copy constructor.
|
inline |
Normal destructor.
|
inline |
return a pointer to the template class (usefull for cast)
|
inline |
Comparaison of Pointer.
|
inline |
return the object of the template class
|
inline |
return a pointer to the template class
|
inline |
Affectation ; destroy old ptr if is no more referenced.
|
inline |
Affectation ; destroy old ptr if is no more referenced.
p | Affectation ; destroy old ptr if is no more referenced |
|
inline |
Comparaison of Pointer.
|
private |
Pointer to the template class T.