Public Member Functions | Static Public Member Functions | Private Attributes

cmtk::Object Class Reference
[cmtkPipeline Library]

Base class for all reference counted objects. More...

#include <cmtkObject.h>

Inheritance diagram for cmtk::Object:
Inheritance graph
[legend]

List of all members.

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.

Detailed Description

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.


Member Function Documentation

virtual int cmtk::Object::Reference (  ) const [inline, virtual]

Register another object as this objects owner.

The reference counter of this object is also incremented.

Returns:
The new value of the reference counter.
See also:
ReferenceCount

Definition at line 136 of file cmtkObject.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines