18 #ifndef itkEventObject_h
19 #define itkEventObject_h
76 MakeObject()
const = 0;
82 Print(std::ostream & os)
const;
86 GetEventName()
const = 0;
98 PrintSelf(std::ostream & os,
Indent indent)
const;
101 PrintHeader(std::ostream & os,
Indent indent)
const;
104 PrintTrailer(std::ostream & os,
Indent indent)
const;
108 inline std::ostream &
117 #define ITKEvent_EXPORT ITKCommon_EXPORT
123 #define itkEventMacroDeclaration(classname, super) \
125 class ITKEvent_EXPORT classname : public super \
128 using Self = classname; \
129 using Superclass = super; \
130 classname() = default; \
131 classname(const Self & s); \
132 virtual ~classname() override; \
133 virtual const char * \
134 GetEventName() const override; \
136 CheckEvent(const itk::EventObject * e) const override; \
137 virtual itk::EventObject * \
138 MakeObject() const override; \
142 operator=(const Self &); \
144 ITK_MACROEND_NOOP_STATEMENT
146 #define itkEventMacroDefinition(classname, super) \
147 classname::classname(const classname & s) \
149 classname::~classname() {} \
150 const char * classname::GetEventName() const { return #classname; } \
151 bool classname::CheckEvent(const itk::EventObject * e) const \
153 return (dynamic_cast<const classname *>(e) != nullptr); \
155 itk::EventObject * classname::MakeObject() const { return new classname; } \
156 ITK_MACROEND_NOOP_STATEMENT
158 #if !defined(ITK_LEGACY_REMOVE)
169 # define itkEventMacro(classname, super) \
171 class ITKEvent_EXPORT classname : public super \
174 using Self = classname; \
175 using Superclass = super; \
177 virtual ~classname() {} \
178 virtual const char * \
179 GetEventName() const \
184 CheckEvent(const itk::EventObject * e) const \
186 return (dynamic_cast<const Self *>(e) != nullptr); \
188 virtual itk::EventObject * \
193 classname(const Self & s) \
198 operator=(const Self &); \
226 #undef ITKEvent_EXPORT
227 #define ITKEvent_EXPORT ITK_ABI_EXPORT