Base class for all reference counted and linked objects. More...
#include <cmtkPipelineObject.h>
Public Member Functions | |
const PipelineObject * | GetOwner () const |
int | Register (PipelineObject *const owner=NULL) |
Register another object as this objects owner. | |
void | Unregister (PipelineObject *const owner=NULL) |
Unregister one owner object. | |
virtual long | Update () |
Check for update. | |
virtual void | Execute () |
Execute the current object. | |
Protected Member Functions | |
PipelineObject () | |
Default constructor. | |
virtual | ~PipelineObject () |
Destructor. | |
void | UpdateExecuteTime () |
Set time of last execution to current time. | |
virtual int | CheckInputForUpdate (PipelineObject *const object) |
Compare input for update. | |
virtual long | ExecuteIfNecessary () |
Execute an update if object was modified after last execution. | |
Protected Attributes | |
PipelineObject * | Owner |
This object's owner. | |
Private Attributes | |
long | ExecuteTime |
Last execution time. | |
int | ExecutePending |
Flag for pending updates. |
Base class for all reference counted and linked objects.
Definition at line 52 of file cmtkPipelineObject.h.
virtual cmtk::PipelineObject::~PipelineObject | ( | ) | [inline, protected, virtual] |
Destructor.
This is defined virtual so that derived classes are enabled to provide their own virtual destructor functions.
Definition at line 114 of file cmtkPipelineObject.h.
virtual void cmtk::PipelineObject::Execute | ( | ) | [inline, virtual] |
Execute the current object.
Derived classes need to override this function in order to make the respective instance up-to-date.
Reimplemented in cmtk::Colormap, cmtk::ImageEdgeOperator, cmtk::ImageToImageRGB, cmtk::PlaneSource, cmtk::Slicer, and cmtk::QtRenderImageRGB.
Definition at line 102 of file cmtkPipelineObject.h.
const PipelineObject* cmtk::PipelineObject::GetOwner | ( | ) | const [inline] |
Definition at line 65 of file cmtkPipelineObject.h.
void cmtk::PipelineObject::UpdateExecuteTime | ( | ) | [inline, protected] |
Set time of last execution to current time.
Definition at line 117 of file cmtkPipelineObject.h.
Referenced by cmtk::Slicer::Execute(), and cmtk::ImageToImageRGB::Execute().
int cmtk::PipelineObject::ExecutePending [private] |
Flag for pending updates.
This field is set to 1 if Update() discovers a changed input object. ExecuteIfNecessary() then evaluates this flag in addition to this objects modification time and calls Exedcute() even if only this flag is set. UpdateExecuteTime() then finally resets this field to 0.
Definition at line 150 of file cmtkPipelineObject.h.
long cmtk::PipelineObject::ExecuteTime [private] |
Last execution time.
This is the time of the latest execution of this objects Execute() function, ie. the time when this objects state or output was last updated according to the input parameters.
Definition at line 142 of file cmtkPipelineObject.h.
PipelineObject* cmtk::PipelineObject::Owner [protected] |
This object's owner.
The owner is the object queried for updates first when this object is asked to update itself.
Definition at line 61 of file cmtkPipelineObject.h.