ALBA
|
#include <albaSmartPointer.h>
Public Member Functions | |
albaAutoPointer (T *r=NULL, void *owner=NULL) | |
albaAutoPointer (const albaAutoPointer &r) | |
~albaAutoPointer () | |
albaAutoPointer & | operator= (T *r) |
albaAutoPointer & | operator= (const albaAutoPointer< T > &r) |
bool | operator== (const albaAutoPointer< T > &r) const |
bool | operator== (const T *r) const |
T * | GetPointer () const |
operator T* () const | |
T * | operator-> () const |
void | UnRegister (void *owner) |
Protected Member Functions | |
void | Swap (albaAutoPointer &r) |
void | Register (void *owner) |
Protected Attributes | |
T * | m_Object |
Hold a reference to a T instance.
albaAutoPointer stores a pointer to a albaSmartObjct, and keeps it registered. When allocated on the stack this object allows to automatically unregister an object when exiting from the scope.
Definition at line 32 of file albaSmartPointer.h.
|
inline |
Initialize smart pointer to (optional) given object.
Definition at line 36 of file albaSmartPointer.h.
References albaAutoPointer< T >::m_Object, and albaAutoPointer< T >::Register().
|
inline |
Initialize smart pointer with a new reference to the same object referenced by given smart pointer.
Definition at line 45 of file albaSmartPointer.h.
References albaAutoPointer< T >::m_Object, and albaAutoPointer< T >::Register().
|
inline |
Destroy smart pointer and remove the reference to its object.
Definition at line 48 of file albaSmartPointer.h.
References albaAutoPointer< T >::UnRegister().
|
inline |
Assign object to reference.
This removes any reference to an old object.
Definition at line 53 of file albaSmartPointer.h.
References albaAutoPointer< T >::Swap().
|
inline |
Definition at line 60 of file albaSmartPointer.h.
References albaAutoPointer< T >::Swap().
|
inline |
Definition at line 68 of file albaSmartPointer.h.
References albaAutoPointer< T >::m_Object.
|
inline |
Definition at line 69 of file albaSmartPointer.h.
References albaAutoPointer< T >::m_Object.
|
inline |
Get the contained pointer.
Definition at line 72 of file albaSmartPointer.h.
References albaAutoPointer< T >::m_Object.
|
inline |
Allow to pass on the smart pointer to any function requiring a "T *".
Definition at line 76 of file albaSmartPointer.h.
|
inline |
Provides normal pointer target member access using operator ->.
Definition at line 79 of file albaSmartPointer.h.
References albaAutoPointer< T >::m_Object.
|
inline |
used to force releasing of internal object, specifying the owner
Definition at line 82 of file albaSmartPointer.h.
References albaAutoPointer< T >::m_Object.
Referenced by albaAutoPointer< T >::~albaAutoPointer().
|
inlineprotected |
Definition at line 92 of file albaSmartPointer.h.
References albaAutoPointer< T >::m_Object.
Referenced by albaAutoPointer< T >::operator=().
|
inlineprotected |
Definition at line 97 of file albaSmartPointer.h.
References albaAutoPointer< T >::m_Object.
Referenced by albaAutoPointer< T >::albaAutoPointer(), and albaSmartPointer< T >::albaSmartPointer().
|
protected |
Pointer to the actual object.
Definition at line 104 of file albaSmartPointer.h.
Referenced by albaAutoPointer< T >::albaAutoPointer(), albaSmartPointer< T >::albaSmartPointer(), albaAutoPointer< T >::GetPointer(), albaAutoPointer< albaAbsMatrixPipe >::operator albaAbsMatrixPipe *(), albaAutoPointer< T >::operator->(), albaAutoPointer< T >::operator==(), albaAutoPointer< T >::Register(), albaAutoPointer< T >::Swap(), and albaAutoPointer< T >::UnRegister().