Public Member Functions | |
TConditionalSmartPointer () | |
Create a TConditionalSmartPointer that currently owns no memory. | |
TConditionalSmartPointer (T *pMemoryThatWasAllocatedWithNew, bool takeOwnershipOfMemory=true) | |
Create a CConditionalSmartPointer that owns the supplied memory which must have been allocated using new. Can optionally be told NOT to take ownership of the supplied memory. | |
TConditionalSmartPointer (const TConditionalSmartPointer &rhs) | |
~TConditionalSmartPointer () | |
TConditionalSmartPointer & | operator= (const TConditionalSmartPointer &rhs) |
TConditionalSmartPointer & | operator= (T *pMemoryThatWasAllocatedWithNew) |
TConditionalSmartPointer & | Assign (T *pMemoryThatWasAllocatedWithNew, bool takeOwnershipOfMemory) |
Assign the supplied pointer to the CConditionalSmartPointer with the indicated ownership. | |
T * | Get () const |
Obtain access to any memory that is owned by the pointer. | |
T * | Detach () |
Give up ownership and return any memory that is owned. | |
operator T * () const | |
Provide access to any memory that is owned by the pointer. | |
T * | operator-> () const |
T & | operator * () const |
bool | IsValid () const |
Returns true if the TConditionalSmartPointer currently points to some memory. |
TConditionalSmartPointer | ( | ) | [inline] |
Create a TConditionalSmartPointer that currently owns no memory.
TConditionalSmartPointer | ( | T * | pMemoryThatWasAllocatedWithNew, | |
bool | takeOwnershipOfMemory = true | |||
) | [inline, explicit] |
Create a CConditionalSmartPointer that owns the supplied memory which must have been allocated using new. Can optionally be told NOT to take ownership of the supplied memory.
TConditionalSmartPointer | ( | const TConditionalSmartPointer< T > & | rhs | ) |
~TConditionalSmartPointer | ( | ) | [inline] |
TConditionalSmartPointer& operator= | ( | const TConditionalSmartPointer< T > & | rhs | ) |
TConditionalSmartPointer< T > & operator= | ( | T * | pMemoryThatWasAllocatedWithNew | ) | [inline] |
TConditionalSmartPointer< T > & Assign | ( | T * | pMemoryThatWasAllocatedWithNew, | |
bool | takeOwnershipOfMemory | |||
) | [inline] |
Assign the supplied pointer to the CConditionalSmartPointer with the indicated ownership.
T * Get | ( | ) | const [inline] |
Obtain access to any memory that is owned by the pointer.
T * Detach | ( | ) | [inline] |
Give up ownership and return any memory that is owned.
operator T * | ( | ) | const [inline] |
Provide access to any memory that is owned by the pointer.
T * operator-> | ( | ) | const [inline] |
T & operator * | ( | ) | const [inline] |
bool IsValid | ( | ) | const [inline] |
Returns true if the TConditionalSmartPointer currently points to some memory.