TexGen
|
Weak pointer that acts as normal pointer except when copied. More...
#include <ObjectContainer.h>
Public Member Functions | |
CWeakPointer () | |
CWeakPointer (const CWeakPointer< T > &CopyMe) | |
CWeakPointer & | operator= (T *pPointer) |
operator T* () | |
Conversion operator. More... | |
T * | operator-> () |
Pointer overload operator to act as a pointer of type T. More... | |
operator const T * () const | |
Conversion operator for when the class is defined as const. More... | |
const T * | operator-> () const |
Pointer overload operator for the class when it is defined as const. More... | |
Private Attributes | |
T * | m_pPointer |
Object contained within the class. More... | |
Weak pointer that acts as normal pointer except when copied.
When the copy constructor is called for this class the pointer is set to NULL. This ensures that when copies of a class are made which contain pointers to their parent, the pointer will not be copied to the copied class. This is not wanted since the copied class will not necessarily be a child of the parent it was copied from.
Definition at line 107 of file ObjectContainer.h.
|
inline |
Definition at line 110 of file ObjectContainer.h.
|
inline |
Definition at line 112 of file ObjectContainer.h.
|
inline |
Conversion operator for when the class is defined as const.
Definition at line 129 of file ObjectContainer.h.
References TexGen::CWeakPointer< T >::m_pPointer.
|
inline |
Conversion operator.
If the weak pointer is passed to a function that expects to receive an object of type T* then it will be converted automatically. Similarly if the container object is dereferenced an object of type T will be obtained.
Definition at line 125 of file ObjectContainer.h.
References TexGen::CWeakPointer< T >::m_pPointer.
|
inline |
Pointer overload operator to act as a pointer of type T.
Definition at line 127 of file ObjectContainer.h.
References TexGen::CWeakPointer< T >::m_pPointer.
|
inline |
Pointer overload operator for the class when it is defined as const.
Definition at line 131 of file ObjectContainer.h.
References TexGen::CWeakPointer< T >::m_pPointer.
|
inline |
Definition at line 113 of file ObjectContainer.h.
References TexGen::CWeakPointer< T >::m_pPointer.
|
private |
Object contained within the class.
Definition at line 134 of file ObjectContainer.h.
Referenced by TexGen::CWeakPointer< T >::operator const T *(), TexGen::CWeakPointer< T >::operator T*(), TexGen::CWeakPointer< T >::operator->(), and TexGen::CWeakPointer< T >::operator=().