Base class for all reference counted objects. More...
#include <cmtkObject.h>
Public Member Functions | |
virtual int | Reference () const |
Register another object as this objects owner. | |
virtual void | Delete () |
Destroy this object. | |
void | SetReferenceCount (const int referenceCount) |
Directly set the reference counter. | |
int | GetReferenceCount () const |
Get the reference counter. | |
long | GetModifiedTime () const |
Return this objects last modification time. | |
void | UpdateModifiedTime () |
Set time of last modification to current time. | |
void | UpdateModifiedTime (long modifiedTime) |
Explicitly set time of last modification. | |
template<class C > | |
bool | ReplaceObject (C *&to, C *const from) |
Utility function: Replace one reference counted object by another. | |
Object () | |
Default constructor. | |
virtual | ~Object () |
Virtual constructor. | |
Static Public Member Functions | |
static long | GetCurrentTime () |
Query the time processing counter. | |
Private Attributes | |
int | ReferenceCount |
The actual reference counter. | |
long | ModifiedTime |
Last modification time. |
Base class for all reference counted objects.
This class to some extent shadows VTK's respective class. However, our class should make be a little more runtime- and memory-efficient.
Definition at line 128 of file cmtkObject.h.
virtual int cmtk::Object::Reference | ( | ) | const [inline, virtual] |
Register another object as this objects owner.
The reference counter of this object is also incremented.
Definition at line 136 of file cmtkObject.h.