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