Reference class Implementation of the reference counting pattern. More...
#include <Handle.h>
Public Member Functions | |
int | getRefCount (void) const |
Get number of references on the object, including this one. | |
bool | isNull (void) const |
Test if it does not handle anything. | |
bool | isValid (void) const |
Test if it handles something. | |
operator T * () const | |
bool | operator!= (const Reference< T > &p) const |
T & | operator* () const |
Dereference operator. | |
T * | operator-> () const |
Dereference operator. | |
bool | operator< (const Reference< T > &p) const |
Lower operator, needed for sorting in maps and sets. | |
Reference< T > & | operator= (const Reference< T > &p) |
Assign operator from a handle. | |
Reference< T > & | operator= (T *p) |
Assign operator from a pointer. | |
bool | operator== (const Reference< T > &p) const |
Equal operator. | |
Reference (const Reference< T > &p) | |
Copy constructor. | |
Reference (T *p) | |
Reference () | |
Pointer and default constructor. | |
~Reference () | |
destructor Release the reference counter which causes, in case of the last one, the referenced object to be destructed! |
Reference class Implementation of the reference counting pattern.
Only able to instantiate with a class inheriting Base::Handled.
Definition at line 46 of file Handle.h.
Base::Reference< T >::Reference | ( | ) | [inline] |
Base::Reference< T >::Reference | ( | T * | p | ) | [inline] |
Base::Reference< T >::Reference | ( | const Reference< T > & | p | ) | [inline] |
Base::Reference< T >::~Reference | ( | ) | [inline] |
int Base::Reference< T >::getRefCount | ( | void | ) | const [inline] |
Get number of references on the object, including this one.
Definition at line 149 of file Handle.h.
Referenced by CmdSandboxMeshTestRef::activated(), and Gui::Dialog::ParameterGroupItem::~ParameterGroupItem().
bool Base::Reference< T >::isNull | ( | void | ) | const [inline] |
bool Base::Reference< T >::isValid | ( | void | ) | const [inline] |
Test if it handles something.
Definition at line 139 of file Handle.h.
Referenced by Mesh::Facet::Facet(), and Gui::WindowParameter::setGroupName().
Base::Reference< T >::operator T * | ( | ) | const [inline] |
bool Base::Reference< T >::operator!= | ( | const Reference< T > & | p | ) | const [inline] |
T& Base::Reference< T >::operator* | ( | ) | const [inline] |
T* Base::Reference< T >::operator-> | ( | ) | const [inline] |
bool Base::Reference< T >::operator< | ( | const Reference< T > & | p | ) | const [inline] |
Reference<T>& Base::Reference< T >::operator= | ( | const Reference< T > & | p | ) | [inline] |
Reference<T>& Base::Reference< T >::operator= | ( | T * | p | ) | [inline] |
bool Base::Reference< T >::operator== | ( | const Reference< T > & | p | ) | const [inline] |