UCommon
|
A reference countable object. More...
#include <object.h>
Public Member Functions | |
virtual void * | getObject (void)=0 |
The actual object being managed can be returned by this method as a void and then recast to the actual type. More... | |
Protected Member Functions | |
RefObject () | |
The constructor simply initializes the count. | |
virtual | ~RefObject () |
The destructor is called when the reference count returns to zero. More... | |
Protected Attributes | |
unsigned | refCount |
Friends | |
class | RefPointer |
A reference countable object.
This is used in association with smart pointers (RefPointer).
|
protectedvirtual |
The destructor is called when the reference count returns to zero.
This is done through a virtual destructor.
|
pure virtual |
The actual object being managed can be returned by this method as a void and then recast to the actual type.
This removes the need to dynamic cast from RefObject and the dependence on rtti this implies.