|
Core Library
|
The base class for all smart-pointer types. More...
#include <SmartPtr.hpp>
Public Member Functions | |
| const T & | operator* () const |
| Pointer dereference operator. | |
| T & | operator* () |
| Pointer dereference operator. | |
| const T * | operator-> () const |
| Pointer-to-member operator. | |
| T * | operator-> () |
| Pointer-to-member operator. | |
| bool | operator! () const |
| Not operator. | |
| T * | get () const |
| Access owned pointer. | |
| T & | getRef () const |
| Access owned pointer as a reference. | |
| bool | empty () const |
| Query if we are not owning a pointer. | |
Protected Member Functions | |
| SmartPtr () | |
| Default constructor. | |
| SmartPtr (T *pPointer) | |
| Construction from a raw pointer. | |
| ~SmartPtr () | |
| Destructor. | |
Protected Attributes | |
| T * | m_pPointer |
| The pointer being shadowed. | |
Private Member Functions | |
| SmartPtr (const SmartPtr &) | |
| SmartPtr & | operator= (const SmartPtr &) |
The base class for all smart-pointer types.
This class provides the common smart-pointer storage and methods for accessing it. All behaviour relating to ownership must be provided by the derived classes.
| Core::SmartPtr< T >::SmartPtr | ( | ) | [inline, protected] |
Default constructor.
| Core::SmartPtr< T >::SmartPtr | ( | T * | pPointer | ) | [inline, explicit, protected] |
Construction from a raw pointer.
| Core::SmartPtr< T >::~SmartPtr | ( | ) | [inline, protected] |
Destructor.
| Core::SmartPtr< T >::SmartPtr | ( | const SmartPtr< T > & | ) | [private] |
| const T & Core::SmartPtr< T >::operator* | ( | ) | const [inline] |
Pointer dereference operator.
Returns the currently owned pointer.
| T & Core::SmartPtr< T >::operator* | ( | ) | [inline] |
Pointer dereference operator.
Returns the currently owned pointer.
| const T * Core::SmartPtr< T >::operator-> | ( | ) | const [inline] |
Pointer-to-member operator.
Returns the currently owned pointer.
| T * Core::SmartPtr< T >::operator-> | ( | ) | [inline] |
Pointer-to-member operator.
Returns the currently owned pointer.
| bool Core::SmartPtr< T >::operator! | ( | ) | const |
Not operator.
Tests for a NULL pointer.
| T * Core::SmartPtr< T >::get | ( | ) | const [inline] |
Access owned pointer.
Returns the currently owned pointer.
| T & Core::SmartPtr< T >::getRef | ( | ) | const [inline] |
Access owned pointer as a reference.
| bool Core::SmartPtr< T >::empty | ( | ) | const [inline] |
Query if we are not owning a pointer.
| SmartPtr& Core::SmartPtr< T >::operator= | ( | const SmartPtr< T > & | ) | [private] |
T* Core::SmartPtr< T >::m_pPointer [protected] |
The pointer being shadowed.
1.7.6.1