ParaView
Public Types | Public Member Functions | Static Public Member Functions
vtkMemberFunctionCommand< ClassT > Class Template Reference

Call a class member method in response to a VTK event. More...

#include <vtkMemberFunctionCommand.h>

Inheritance diagram for vtkMemberFunctionCommand< ClassT >:
Inheritance graph
[legend]
Collaboration diagram for vtkMemberFunctionCommand< ClassT >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkCommand Superclass

Public Member Functions

virtual const char * GetClassNameInternal () const
void PrintSelf (ostream &os, vtkIndent indent)
void SetCallback (ClassT &object, void(ClassT::*method2)(vtkObject *, unsigned long, void *))
virtual void Execute (vtkObject *caller, unsigned long event, void *calldata)
void Reset ()
void SetCallback (ClassT &object, void(ClassT::*method)())

Static Public Member Functions

static ThisTSafeDownCast (vtkObjectBase *o)
static ThisTNew ()

Detailed Description

template<class ClassT>
class vtkMemberFunctionCommand< ClassT >

Call a class member method in response to a VTK event.

vtkMemberFunctionCommand is a vtkCommand-derivative that will listen for VTK events, calling a class member function when a VTK event is received.

It is generally more useful than vtkCallbackCommand, which can only call non-member functions in response to a VTK event.

Usage: create an instance of vtkMemberFunctionCommand, specialized for the class that will receive events. Use the SetCallback() method to pass the instance and member function that will be called when an event is received. Use vtkObject::AddObserver() to control which VTK events the vtkMemberFunctionCommand object will receive.

Usage:

vtkObject* subject = /* ...

Definition at line 73 of file vtkMemberFunctionCommand.h.


Member Typedef Documentation

template<class ClassT>
typedef vtkCommand vtkMemberFunctionCommand< ClassT >::Superclass

Reimplemented from vtkCommand.

Definition at line 79 of file vtkMemberFunctionCommand.h.


Member Function Documentation

template<class ClassT>
virtual const char* vtkMemberFunctionCommand< ClassT >::GetClassNameInternal ( ) const [inline, virtual]

Definition at line 81 of file vtkMemberFunctionCommand.h.

template<class ClassT>
static ThisT* vtkMemberFunctionCommand< ClassT >::SafeDownCast ( vtkObjectBase o) [inline, static]

Definition at line 83 of file vtkMemberFunctionCommand.h.

template<class ClassT>
static ThisT* vtkMemberFunctionCommand< ClassT >::New ( ) [inline, static]

Reimplemented from vtkObjectBase.

Definition at line 88 of file vtkMemberFunctionCommand.h.

template<class ClassT>
void vtkMemberFunctionCommand< ClassT >::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [inline, virtual]

Reimplemented from vtkObjectBase.

Definition at line 93 of file vtkMemberFunctionCommand.h.

template<class ClassT>
void vtkMemberFunctionCommand< ClassT >::SetCallback ( ClassT &  object,
void(ClassT::*)()  method 
) [inline]

Set which class instance and member function will be called when a VTK event is received.

Definition at line 101 of file vtkMemberFunctionCommand.h.

template<class ClassT>
void vtkMemberFunctionCommand< ClassT >::SetCallback ( ClassT &  object,
void(ClassT::*)(vtkObject *, unsigned long, void *)  method2 
) [inline]

Definition at line 108 of file vtkMemberFunctionCommand.h.

template<class ClassT>
There are two types of callback methods that could be defined li void unsigned long void *calldata which is passed the same arguments as vtkCommand::Execute ( vtkObject caller,
unsigned long  event,
void *  calldata 
) [inline, virtual]

Implements vtkCommand.

Definition at line 115 of file vtkMemberFunctionCommand.h.

template<class ClassT>
void vtkMemberFunctionCommand< ClassT >::Reset ( ) [inline]

Definition at line 126 of file vtkMemberFunctionCommand.h.


The documentation for this class was generated from the following file: