Helper class to use pointer. More...
Helper class to use pointer.
pointerType | Type of pointer. |
Automatically initialized to NULL. Can be used more or less like a standard pointer. Secured against access violation.
Public Member Methods | |
SmartPointer () | |
Default constructor. More... | |
SmartPointer (pointerType *pointer) | |
Default constructor. More... | |
SmartPointer (const SmartPointer< pointerType > &right) | |
Copy constructor. More... | |
SmartPointer & | operator= (pointerType *right) |
Assignment operator. More... | |
pointerType & | operator* () |
pointerType& casting operator. More... | |
const pointerType & | operator* () const |
pointerType& casting operator. More... | |
pointerType * | operator-> () |
pointerType& casting operator. More... | |
const pointerType * | operator-> () const |
pointerType& casting operator. More... | |
bool | IsNull () const |
Query if the pointer is null. More... | |
bool | operator== (const pointerType *right) const |
Equal operator towards pointers More... | |
bool | operator!= (const pointerType *right) const |
Not equal operator towards pointers More... | |
bool | operator== (const SmartPointer< pointerType > &right) const |
Equal operator towards SmartPointer of the same type. More... | |
bool | operator!= (const SmartPointer< pointerType > &right) const |
Not equal operator towards SmartPointer of the same type. More... | |
void | SetNull () |
Set the SmartPointer to null. More... | |
void | Delete () |
Free the memory and set the pointer to null. More... | |
pointerType * | GetPointer () |
Get the pointer value. More... | |
|
inline |
Default constructor.
|
inline |
Default constructor.
pointer | The pointer. |
|
inline |
Copy constructor.
right | The right. |
|
inline |
Free the memory and set the pointer to null.
|
inline |
Get the pointer value.
|
inline |
Query if the pointer is null.
|
inline |
Not equal operator towards pointers
right | The right nullable. |
|
inline |
Not equal operator towards SmartPointer of the same type.
right | The right nullable. |
|
inline |
pointerType& casting operator.
|
inline |
pointerType& casting operator.
|
inline |
pointerType& casting operator.
|
inline |
pointerType& casting operator.
|
inline |
Assignment operator.
right | The right. |
|
inline |
Equal operator towards pointers
right | The right nullable. |
|
inline |
Equal operator towards SmartPointer of the same type.
right | The right nullable. |
|
inline |
Set the SmartPointer to null.