|
MURE
|
Handle dynamical object creation and pointer affectation. More...
#include <TReference.hxx>
Public Member Functions | |
| Reference_ptr (T *p=nullptr) | |
| Reference_ptr (const Reference_ptr &r) | |
| ~Reference_ptr () | |
| T & | operator* () const |
| T * | operator-> () const |
| T * | Get () const |
| Reference_ptr & | operator= (const Reference_ptr &r) |
| Affectation ; destroy old ptr if is no more referenced. | |
| Reference_ptr & | operator= (T *p) |
| Affectation ; destroy old ptr if is no more referenced. | |
| bool | operator== (T *p) |
| bool | operator!= (T *p) |
Private Attributes | |
| T * | ptr |
| Pointer to the template class T. | |
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 (smart pointer).
|
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.