73 template <
class ClassT>
85 static ThisT*
New() {
return new ThisT(); }
96 this->Object = &object;
97 this->Method = method;
103 this->Object = &object;
104 this->Method2 = method2;
109 if (this->Object && this->Method)
111 (this->Object->*this->Method)();
113 if (this->Object && this->Method2)
115 (this->Object->*this->Method2)(caller, event, calldata);
136 void (ClassT::*Method)();
137 void (ClassT::*Method2)(
vtkObject* caller,
unsigned long event,
void* calldata);
158 template <
class ClassT>
160 ClassT&
object,
void (ClassT::*method)())
167 template <
class ClassT>
169 ClassT&
object,
void (ClassT::*method)(
vtkObject*,
unsigned long,
void*))
void SetCallback(ClassT &object, void(ClassT::*method)())
Set which class instance and member function will be called when a VTK event is received.
static ThisT * SafeDownCast(vtkObjectBase *o)
const char * GetClassNameInternal() const override
void SetCallback(ClassT &object, void(ClassT::*method2)(vtkObject *, unsigned long, void *))
void PrintSelf(ostream &os, vtkIndent indent) override
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkMemberFunctionCommand< ClassT > * vtkMakeMemberFunctionCommand(ClassT &object, void(ClassT::*method)())
Convenience function for creating vtkMemberFunctionCommand instances that automatically deduces its a...
void Execute(vtkObject *caller, unsigned long event, void *calldata) override
Call a class member method in response to a VTK event.