ITK
6.0.0
Insight Toolkit
|
#include <itkEventObject.h>
Abstraction of the Events used to communicating among filters and with GUIs.
EventObject provides a standard coding for sending and receiving messages indicating things like the initiation of processes, end of processes, modification of filters.
EventObjects form a hierarchy similar to the itk::ExceptionObject allowing to factorize common events in a tree-like structure. Higher detail can be assigned by users by subclassing existing itk::EventObjects.
EventObjects are used by itk::Command and itk::Object for implementing the Observer/Subject design pattern. Observers register their interest in particular kinds of events produced by a specific itk::Object. This mechanism decouples classes among them.
As opposed to itk::Exception, itk::EventObject does not represent error states, but simply flow of information allowing to trigger actions as a consequence of changes occurring in state on some itk::Objects.
itk::EventObject carries information in its own type, it relies on the appropriate use of the RTTI (Run Time Type Information).
A set of standard EventObjects is defined near the end of itkEventObject.h.
Definition at line 58 of file itkEventObject.h.
Public Member Functions | |
virtual bool | CheckEvent (const EventObject *) const =0 |
EventObject ()=default | |
EventObject (const EventObject &)=default | |
virtual const char * | GetEventName () const =0 |
virtual EventObject * | MakeObject () const =0 |
EventObject & | operator= (const EventObject &)=delete |
virtual void | Print (std::ostream &os) const |
virtual | ~EventObject ()=default |
Protected Member Functions | |
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
virtual void | PrintSelf (std::ostream &os, Indent indent) const |
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
|
default |
Constructor and copy constructor. Note that these functions will be called when children are instantiated.
|
default |
|
virtualdefault |
Virtual destructor needed
|
pure virtual |
Check if given event matches or derives from this event.
|
pure virtual |
Return the StringName associated with the event.
|
pure virtual |
Create an Event of this type This method work as a Factory for creating events of each particular type.
|
delete |
|
virtual |
Print Event information. This method can be overridden by specific Event subtypes. The default is to print out the type of the event.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |