SimpleITK  2.0.0rc2.post21
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 ()
 
virtual std::string GetName () const
 
virtual void SetName (const std::string &name)
 
virtual ~Command ()
 

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 ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 

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 CommandPage.

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

◆ Command()

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

Default Constructor.

◆ ~Command()

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

Destructor.

Member Function Documentation

◆ AddProcessObject()

virtual size_t itk::simple::Command::AddProcessObject ( itk::simple::ProcessObject o)
protectedvirtual

◆ Execute()

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

◆ GetName()

virtual std::string itk::simple::Command::GetName ( ) const
inlinevirtual

Set/Get Command Name

Definition at line 56 of file sitkCommand.h.

◆ GetOwnedByProcessObjects()

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

Definition at line 76 of file sitkCommand.h.

◆ OwnedByProcessObjectsOff()

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

Definition at line 78 of file sitkCommand.h.

◆ OwnedByProcessObjectsOn()

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

Definition at line 77 of file sitkCommand.h.

◆ RemoveProcessObject()

virtual size_t itk::simple::Command::RemoveProcessObject ( const itk::simple::ProcessObject o)
protectedvirtual

◆ SetName()

virtual void itk::simple::Command::SetName ( const std::string &  name)
inlinevirtual

Definition at line 57 of file sitkCommand.h.

◆ SetOwnedByProcessObjects()

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

Definition at line 75 of file sitkCommand.h.

Friends And Related Function Documentation

◆ itk::simple::ProcessObject

friend class itk::simple::ProcessObject
friend

Definition at line 64 of file sitkCommand.h.

Member Data Documentation

◆ m_Name

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

Definition at line 88 of file sitkCommand.h.

◆ m_OwnedByProcessObjects

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

Definition at line 87 of file sitkCommand.h.

◆ m_ReferencedObjects

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: