SimpleITK  1.2.4
Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
itk::simple::Command Class Reference

An implementation of the Command design pattern for callback. More...

#include <sitkCommand.h>

+ Inheritance diagram for itk::simple::Command:
+ Collaboration diagram for itk::simple::Command:

Public Member Functions

 Command ()
 Default Constructor. More...
 
virtual void Execute (void)
 
virtual std::string GetName () const
 
virtual void SetName (const std::string &name)
 
virtual ~Command (void)
 

Protected Member Functions

virtual size_t AddProcessObject (itk::simple::ProcessObject *o)
 
virtual bool GetOwnedByProcessObjects () const
 
virtual void OwnedByProcessObjectsOff ()
 
virtual void OwnedByProcessObjectsOn ()
 
virtual size_t RemoveProcessObject (const itk::simple::ProcessObject *o)
 
virtual void SetOwnedByProcessObjects (bool o)
 
- Protected Member Functions inherited from itk::simple::NonCopyable
 NonCopyable ()
 

Private Attributes

std::string m_Name
 
bool m_OwnedByProcessObjects
 
std::set< itk::simple::ProcessObject * > m_ReferencedObjects
 

Friends

class itk::simple::ProcessObject
 

Detailed Description

An implementation of the Command design pattern for callback.

This class provides a callback mechanism for event that occur from the ProcessObject. These commands can be utilized to observe these events.

The Command can be created on the stack, and will automatically unregistered it's self when destroyed.

For more information see the page Commands and Events for SimpleITK.

Examples:
DemonsRegistration1/DemonsRegistration1.cxx, DemonsRegistration2/DemonsRegistration2.cxx, FilterProgressReporting/FilterProgressReporting.cxx, ImageRegistrationMethod1/ImageRegistrationMethod1.cxx, ImageRegistrationMethod2/ImageRegistrationMethod2.cxx, ImageRegistrationMethodBSpline1/ImageRegistrationMethodBSpline1.cxx, ImageRegistrationMethodBSpline3/ImageRegistrationMethodBSpline3.cxx, and ImageRegistrationMethodDisplacement1/ImageRegistrationMethodDisplacement1.cxx.

Definition at line 44 of file sitkCommand.h.

Constructor & Destructor Documentation

itk::simple::Command::Command ( )

Default Constructor.

virtual itk::simple::Command::~Command ( void  )
virtual

Destructor.

Member Function Documentation

virtual size_t itk::simple::Command::AddProcessObject ( itk::simple::ProcessObject o)
protectedvirtual
virtual void itk::simple::Command::Execute ( void  )
virtual
virtual std::string itk::simple::Command::GetName ( ) const
inlinevirtual

Set/Get Command Name

Definition at line 56 of file sitkCommand.h.

virtual bool itk::simple::Command::GetOwnedByProcessObjects ( ) const
inlineprotectedvirtual

Definition at line 76 of file sitkCommand.h.

virtual void itk::simple::Command::OwnedByProcessObjectsOff ( )
inlineprotectedvirtual

Definition at line 78 of file sitkCommand.h.

virtual void itk::simple::Command::OwnedByProcessObjectsOn ( )
inlineprotectedvirtual

Definition at line 77 of file sitkCommand.h.

virtual size_t itk::simple::Command::RemoveProcessObject ( const itk::simple::ProcessObject o)
protectedvirtual
virtual void itk::simple::Command::SetName ( const std::string &  name)
inlinevirtual

Definition at line 57 of file sitkCommand.h.

virtual void itk::simple::Command::SetOwnedByProcessObjects ( bool  o)
inlineprotectedvirtual

Definition at line 75 of file sitkCommand.h.

Friends And Related Function Documentation

friend class itk::simple::ProcessObject
friend

Definition at line 64 of file sitkCommand.h.

Member Data Documentation

std::string itk::simple::Command::m_Name
private

Definition at line 88 of file sitkCommand.h.

bool itk::simple::Command::m_OwnedByProcessObjects
private

Definition at line 87 of file sitkCommand.h.

std::set<itk::simple::ProcessObject*> itk::simple::Command::m_ReferencedObjects
private

Definition at line 85 of file sitkCommand.h.


The documentation for this class was generated from the following file: