VTK
vtkPythonCommand.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPythonCommand.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
16 #ifndef __vtkPythonCommand_h
17 #define __vtkPythonCommand_h
18 
19 #include "vtkPython.h"
20 #include "vtkCommand.h"
21 
22 // To allow Python to use the vtkCommand features
23 class VTK_COMMON_PYTHON_EXPORT vtkPythonCommand : public vtkCommand
24 {
25 public:
27 
28  static vtkPythonCommand *New() { return new vtkPythonCommand; };
29 
30  void SetObject(PyObject *o);
31  void SetThreadState(PyThreadState *ts);
32  void Execute(vtkObject *ptr, unsigned long eventtype, void *CallData);
33 
34  PyObject *obj;
35  PyThreadState *ThreadState;
36 protected:
39 };
40 
41 #endif
virtual void Execute(vtkObject *caller, unsigned long eventId, void *callData)=0
abstract base class for most VTK objects
Definition: vtkObject.h:60
superclass for callback/observer methods
Definition: vtkCommand.h:211
PyThreadState * ThreadState
static vtkPythonCommand * New()