18 #ifndef itkEventObject_h
19 #define itkEventObject_h
75 MakeObject()
const = 0;
81 Print(std::ostream & os)
const;
85 GetEventName()
const = 0;
97 PrintSelf(std::ostream & os,
Indent indent)
const;
100 PrintHeader(std::ostream & os,
Indent indent)
const;
103 PrintTrailer(std::ostream & os,
Indent indent)
const;
107 inline std::ostream &
116 #define ITKEvent_EXPORT ITKCommon_EXPORT
122 #define itkEventMacroDeclaration(classname, super) \
124 class ITKEvent_EXPORT classname : public super \
127 using Self = classname; \
128 using Superclass = super; \
129 classname() = default; \
130 classname(const Self & s); \
131 virtual ~classname() override; \
132 virtual const char * \
133 GetEventName() const override; \
135 CheckEvent(const ::itk::EventObject * e) const override; \
136 virtual ::itk::EventObject * \
137 MakeObject() const override; \
141 operator=(const Self &); \
143 static_assert(true, "Compile time eliminated. Used to require a semi-colon at end of macro.")
145 #define itkEventMacroDefinition(classname, super) \
146 classname::classname(const classname & s) \
148 classname::~classname() {} \
149 const char * classname::GetEventName() const { return #classname; } \
150 bool classname::CheckEvent(const ::itk::EventObject * e) const \
152 return (dynamic_cast<const classname *>(e) != nullptr); \
154 ::itk::EventObject * classname::MakeObject() const { return new classname; } \
155 static_assert(true, "Compile time eliminated. Used to require a semi-colon at end of macro.")
157 #if !defined(ITK_LEGACY_REMOVE)
168 # define itkEventMacro(classname, super) \
170 class ITKEvent_EXPORT classname : public super \
173 using Self = classname; \
174 using Superclass = super; \
176 virtual ~classname() {} \
177 virtual const char * \
178 GetEventName() const \
183 CheckEvent(const ::itk::EventObject * e) const \
185 return (dynamic_cast<const Self *>(e) != nullptr); \
187 virtual ::itk::EventObject * \
192 classname(const Self & s) \
197 operator=(const Self &); \
225 #undef ITKEvent_EXPORT
226 #define ITKEvent_EXPORT ITK_ABI_EXPORT