#include <itkEventObject.h>
Public Methods | |
EventObject () | |
virtual | ~EventObject () |
virtual EventObject * | MakeObject () const=0 |
virtual void | Print (std::ostream &os) const |
virtual const char * | GetEventName (void) const=0 |
virtual bool | CheckEvent (const EventObject *) const=0 |
Protected Methods | |
virtual void | PrintSelf (std::ostream &os, Indent indent) const |
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
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 oppossed to itk::Exception, itk::EventObject does not represent error states, but simply flow of information allowing to trigger actions as a consecuence of changes occurring in state on some itk::Objects.
itk::EventObject carries information in its own type, it relies on the appropiate use of the RTTI (Run Time Type Information).
Definition at line 56 of file itkEventObject.h.
|
Constructor and copy constructor. Note that these functions will be called when children are instantiated. Definition at line 61 of file itkEventObject.h. |
|
Virtual destructor needed Definition at line 64 of file itkEventObject.h. |
|
Check if given event matches or derives from this event. |
|
Return the StringName associated with the event. |
|
Create an Event of this type This method work as a Factory for creating events of each particular type. |
|
Print Event information. This method can be overridden by specific Event subtypes. The default is to print out the type of the event. |
|
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. |
|
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. |
|
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. |