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 "vtkWrappingPythonCoreModule.h" // For export macro
20 #include "vtkPython.h"
21 #include "vtkCommand.h"
22 
23 // To allow Python to use the vtkCommand features
24 class VTKWRAPPINGPYTHONCORE_EXPORT vtkPythonCommand : public vtkCommand
25 {
26 public:
28 
29  static vtkPythonCommand *New() { return new vtkPythonCommand; };
30 
31  void SetObject(PyObject *o);
32  void SetThreadState(PyThreadState *ts);
33  void Execute(vtkObject *ptr, unsigned long eventtype, void *callData);
34 
36  PyThreadState *ThreadState;
37 protected:
40 };
41 
42 #endif
43 // VTK-HeaderTest-Exclude: vtkPythonCommand.h
virtual void Execute(vtkObject *caller, unsigned long eventId, void *callData)=0
abstract base class for most VTK objects
Definition: vtkObject.h:61
superclass for callback/observer methods
Definition: vtkCommand.h:325
PyThreadState * ThreadState
static vtkPythonCommand * New()
struct _object PyObject