69 ITK_DISALLOW_COPY_AND_ASSIGN(
Command);
83 template< typename T >
89 typedef void ( T::*TConstMemberFunctionPointer )(
const Object *,
106 TMemberFunctionPointer memberFunction)
109 m_MemberFunction = memberFunction;
113 TConstMemberFunctionPointer memberFunction)
116 m_ConstMemberFunction = memberFunction;
122 if ( m_MemberFunction )
124 ( ( *m_This ).*( m_MemberFunction ) )( caller, event );
132 if ( m_ConstMemberFunction )
134 ( ( *m_This ).*( m_ConstMemberFunction ) )( caller, event );
145 m_This( ITK_NULLPTR ),
146 m_MemberFunction( ITK_NULLPTR ),
147 m_ConstMemberFunction( ITK_NULLPTR )
165 template<
typename T >
185 TMemberFunctionPointer memberFunction)
188 m_MemberFunction = memberFunction;
194 if ( m_MemberFunction )
196 ( ( *m_This ).*( m_MemberFunction ) )( event );
204 if ( m_MemberFunction )
206 ( ( *m_This ).*( m_MemberFunction ) )( event );
216 m_This( ITK_NULLPTR ),
217 m_MemberFunction( ITK_NULLPTR )
235 template<
typename T >
240 typedef void ( T::*TMemberFunctionPointer )();
254 TMemberFunctionPointer memberFunction)
257 m_MemberFunction = memberFunction;
263 if ( m_MemberFunction )
265 ( ( *m_This ).*( m_MemberFunction ) )( );
272 if ( m_MemberFunction )
274 ( ( *m_This ).*( m_MemberFunction ) )( );
283 m_This( ITK_NULLPTR ),
284 m_MemberFunction( ITK_NULLPTR )
302 template<
typename T >
307 typedef void ( T::*TMemberFunctionPointer )()
const;
321 TMemberFunctionPointer memberFunction)
324 m_MemberFunction = memberFunction;
330 if ( m_MemberFunction )
332 ( ( *m_This ).*( m_MemberFunction ) )( );
339 if ( m_MemberFunction )
341 ( ( *m_This ).*( m_MemberFunction ) )( );
350 m_This( ITK_NULLPTR ),
351 m_MemberFunction( ITK_NULLPTR )
377 typedef void ( *ConstFunctionPointer )(
const Object *,
379 typedef void ( *DeleteDataFunctionPointer )(
void *);
394 void SetClientData(
void *cd);
397 void SetCallback(FunctionPointer f);
398 void SetConstCallback(ConstFunctionPointer f);
402 void SetClientDataDeleteCallback(DeleteDataFunctionPointer f);
415 FunctionPointer m_Callback;
416 ConstFunctionPointer m_ConstCallback;
417 DeleteDataFunctionPointer m_ClientDataDeleteCallback;
virtual void Execute(Object *, const EventObject &event) override
ReceptorMemberCommand Self
SmartPointer< Self > Pointer
TConstMemberFunctionPointer m_ConstMemberFunction
TMemberFunctionPointer m_MemberFunction
void SetCallbackFunction(const T *object, TMemberFunctionPointer memberFunction)
TMemberFunctionPointer m_MemberFunction
SmartPointer< Self > Pointer
virtual ~ReceptorMemberCommand() override
TMemberFunctionPointer m_MemberFunction
A Command subclass that calls a pointer to a C function.
TMemberFunctionPointer m_MemberFunction
A Command subclass that calls a pointer to a member function.
virtual void Execute(Object *, const EventObject &) override
virtual void Execute(Object *, const EventObject &) override
virtual void Execute(const Object *, const EventObject &) override
virtual ~SimpleConstMemberCommand()
void SetCallbackFunction(T *object, TMemberFunctionPointer memberFunction)
SimpleConstMemberCommand()
virtual void Execute(const Object *, const EventObject &event) override
SmartPointer< Self > Pointer
SmartPointer< Self > Pointer
virtual ~SimpleMemberCommand() override
void SetCallbackFunction(T *object, TConstMemberFunctionPointer memberFunction)
int Execute(int argc, char *argv[])
A Command subclass that calls a pointer to a member function.
Abstraction of the Events used to communicating among filters and with GUIs.
A Command subclass that calls a pointer to a member function.
virtual ~MemberCommand() override
virtual void Execute(Object *caller, const EventObject &event) override
SmartPointer< Self > Pointer
SmartPointer< const Self > ConstPointer
A Command subclass that calls a pointer to a member function.
virtual void Execute(const Object *, const EventObject &) override
SmartPointer< Self > Pointer
class ITK_FORWARD_EXPORT Command
Base class for most ITK classes.
void SetCallbackFunction(T *object, TMemberFunctionPointer memberFunction)
virtual void Execute(const Object *caller, const EventObject &event) override
Superclass for callback/observer methods.
SimpleConstMemberCommand Self
void SetCallbackFunction(T *object, TMemberFunctionPointer memberFunction)