An object with a reference counter. More...
#include <Object.h>
Public Member Functions | |
Object (const char *type) | |
Creates a new object. | |
virtual | ~Object () |
Destroys this object. | |
const char * | getClass () const |
Returns the name of the class of this object. | |
virtual const char * | toString () |
Returns a string representation of this object. | |
Static Public Member Functions | |
static void | exit () |
Sets all static references to NULL. | |
Protected Member Functions | |
virtual void | doRelease () |
The method called when the reference count of this object becomes 0. |
An object with a reference counter.
The reference count is managed by the ptr and static_ptr classes to count the number of references to this object. When this counter becomes 0 the object is automatically destroyed. Instances of this class or of derived classes must NOT be explicitely destroyed with the delete operator.
ork::Object::Object | ( | const char * | type | ) |
Creates a new object.
type | the name of the class of this object. For debug only. |
virtual ork::Object::~Object | ( | ) | [virtual] |
Destroys this object.
virtual void ork::Object::doRelease | ( | ) | [inline, protected, virtual] |
The method called when the reference count of this object becomes 0.
The default implementation of this method deletes the object.
static void ork::Object::exit | ( | ) | [static] |
Sets all static references to NULL.
const char* ork::Object::getClass | ( | ) | const |
Returns the name of the class of this object.
For debug only.
virtual const char* ork::Object::toString | ( | ) | [virtual] |
Returns a string representation of this object.