18 #ifndef itkEventObject_h
19 #define itkEventObject_h
76 virtual void Print(std::ostream & os)
const;
79 virtual const char * GetEventName(
void)
const = 0;
82 virtual bool CheckEvent(
const EventObject *)
const = 0;
89 virtual void PrintSelf(std::ostream & os,
Indent indent)
const;
91 virtual void PrintHeader(std::ostream & os,
Indent indent)
const;
93 virtual void PrintTrailer(std::ostream & os,
Indent indent)
const;
109 #define ITKEvent_EXPORT ITKCommon_EXPORT
115 #define itkEventMacroDeclaration(classname, super) \
117 class ITKEvent_EXPORT classname:public super \
120 typedef classname Self; \
121 typedef super Superclass; \
123 classname(const Self &s); \
124 virtual ~classname(); \
125 virtual const char *GetEventName() const; \
126 virtual bool CheckEvent(const::itk::EventObject * e) const; \
127 virtual ::itk::EventObject *MakeObject() const; \
129 void operator=(const Self &); \
132 #define itkEventMacroDefinition(classname, super) \
133 classname::classname() {} \
134 classname::classname(const classname &s):super(s){}; \
135 classname::~classname() {} \
136 const char * classname::GetEventName() const { return #classname; } \
137 bool classname::CheckEvent(const::itk::EventObject * e) const \
138 { return ( dynamic_cast< const classname * >( e ) != ITK_NULLPTR ); } \
139 ::itk::EventObject *classname::MakeObject() const { return new classname; } \
150 #define itkEventMacro(classname, super) \
152 class ITKEvent_EXPORT classname:public super \
155 typedef classname Self; \
156 typedef super Superclass; \
158 virtual ~classname() {} \
159 virtual const char *GetEventName() const { return #classname; } \
160 virtual bool CheckEvent(const::itk::EventObject * e) const \
161 { return ( dynamic_cast< const Self * >( e ) != ITK_NULLPTR ); } \
162 virtual::itk::EventObject *MakeObject() const \
163 { return new Self; } \
164 classname(const Self &s):super(s){}; \
166 void operator=(const Self &); \
193 #undef ITKEvent_EXPORT
194 #define ITKEvent_EXPORT ITK_ABI_EXPORT
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
static const double e
The base of the natural logarithm or Euler's number
#define itkEventMacroDeclaration(classname, super)
EventObject * EventFactoryFunction()
Abstraction of the Events used to communicating among filters and with GUIs.
EventObject(const EventObject &)
Control indentation during Print() invocation.