#include <OpenGUI_RefPtr.h>
Public Member Functions | |
| RefPtr (T *ptr=0) | |
| Create a RefPtr from an existing pointer, or empty. | |
| RefPtr (const RefPtr< T > &ptr) | |
| Create a RefPtr from another RefPtr. | |
| ~RefPtr () | |
| Destructor does the usual unreferencing operation. | |
| unsigned int | getRefCount () |
| Return the total number of references to the stored pointer, yourself included. | |
| RefPtr< T > & | operator= (const RefPtr< T > &ptr) |
| Assignment operator. | |
| T & | operator * () const |
| The usual *RefPtr resolving. | |
| T * | operator-> () const |
| The usual RefPtr->somthing resolving. | |
| operator bool () const | |
| This makes "if( RefPtr )" work just like "if( !RefPtr.isNull() )". | |
| bool | operator== (int p) const |
| This allows us to use "if( RefPtr == NULL )" and "if( RefPtr == 0 )". | |
| bool | operator!= (int p) const |
| used for "if( RefPtr != NULL )" and "if(RefPtr != 0 )" | |
| bool | operator== (const T *p) const |
| Used for "if( RefPtr == normal_pointer )". | |
| bool | operator== (const RefPtr &r) const |
| Used for "if( RefPtr == RefPtr )". | |
| bool | operator!= (const RefPtr &r) const |
| Used for "if( RefPtr != RefPtr )". | |
| bool | operator!= (const T *p) const |
| Used for "if( RefPtr != normal_pointer )". | |
| bool | isNull () const |
| RefPtr.isNull() returns true if RefPtr carries no pointer. | |
| T * | get () const |
| Returns the carried pointer in raw form. | |
|
||||||||||
|
Create a RefPtr from an existing pointer, or empty.
|
|
||||||||||
|
Create a RefPtr from another RefPtr.
|
|
|||||||||
|
Destructor does the usual unreferencing operation.
|
|
|||||||||
|
Returns the carried pointer in raw form.
|
|
|||||||||
|
Return the total number of references to the stored pointer, yourself included.
|
|
|||||||||
|
RefPtr.isNull() returns true if RefPtr carries no pointer.
|
|
|||||||||
|
The usual *RefPtr resolving.
|
|
|||||||||
|
This makes "if( RefPtr )" work just like "if( !RefPtr.isNull() )".
|
|
||||||||||
|
Used for "if( RefPtr != normal_pointer )".
|
|
||||||||||
|
Used for "if( RefPtr != RefPtr )".
|
|
||||||||||
|
used for "if( RefPtr != NULL )" and "if(RefPtr != 0 )"
|
|
|||||||||
|
The usual RefPtr->somthing resolving.
|
|
||||||||||
|
Assignment operator.
|
|
||||||||||
|
Used for "if( RefPtr == RefPtr )".
|
|
||||||||||
|
Used for "if( RefPtr == normal_pointer )".
|
|
||||||||||
|
This allows us to use "if( RefPtr == NULL )" and "if( RefPtr == 0 )".
|