Go to the documentation of this file.
19 #ifndef vtkPythonUtil_h
20 #define vtkPythonUtil_h
22 #include "vtkPython.h"
23 #include "PyVTKClass.h"
24 #include "PyVTKMutableObject.h"
25 #include "PyVTKNamespace.h"
26 #include "PyVTKObject.h"
27 #include "PyVTKSpecialObject.h"
29 class vtkPythonClassMap;
31 class vtkPythonCommandList;
32 class vtkPythonGhostMap;
33 class vtkPythonObjectMap;
34 class vtkPythonSpecialTypeMap;
35 class vtkPythonNamespaceMap;
68 const char *classname);
86 const void *ptr,
const char* classname,
bool is_new);
106 PyTypeObject *pytype, PyMethodDef *methods, PyMethodDef *constructors,
107 const char *docstring[], PyVTKSpecialCopyFunc copyfunc);
165 vtkPythonObjectMap *ObjectMap;
166 vtkPythonGhostMap *GhostMap;
167 vtkPythonClassMap *ClassMap;
168 vtkPythonSpecialTypeMap *SpecialTypeMap;
169 vtkPythonNamespaceMap *NamespaceMap;
170 vtkPythonCommandList *PythonCommandList;
184 #if PY_VERSION_HEX >= 0x02060000 // for tp_version_tag
185 #define VTK_PYTHON_UTIL_SUPRESS_UNINITIALIZED \
186 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0, 0,
187 #define VTK_WRAP_PYTHON_SUPRESS_UNINITIALIZED \
189 #elif PY_VERSION_HEX >= 0x02030000
190 #define VTK_PYTHON_UTIL_SUPRESS_UNINITIALIZED \
191 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,
192 #define VTK_WRAP_PYTHON_SUPRESS_UNINITIALIZED \
194 #elif PY_VERSION_HEX >= 0x02020000
195 #define VTK_PYTHON_UTIL_SUPRESS_UNINITIALIZED \
196 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
197 #define VTK_WRAP_PYTHON_SUPRESS_UNINITIALIZED
199 #define VTK_PYTHON_UTIL_SUPRESS_UNINITIALIZED
200 #define VTK_WRAP_PYTHON_SUPRESS_UNINITIALIZED
203 #if PY_VERSION_HEX < 0x02050000
static PyObject * FindNearestBaseClass(vtkObjectBase *ptr)
static PyObject * FindNamespace(const char *name)
GLsizei GLsizei GLuint * obj
static void AddObjectToMap(PyObject *obj, vtkObjectBase *anInstance)
static vtkObjectBase * GetPointerFromObject(PyObject *obj, const char *classname)
#define VTKWRAPPINGPYTHONCORE_EXPORT
static PyObject * SIPGetObjectFromPointer(const void *ptr, const char *classname, bool is_new)
static const char * PythonicClassName(const char *classname)
friend void vtkPythonUtilCreateIfNeeded()
static long VariantHash(const vtkVariant *variant)
VTKWRAPPINGPYTHONCORE_EXPORT void vtkPythonVoidFuncArgDelete(void *)
GLuint const GLchar * name
static void UnRegisterPythonCommand(vtkPythonCommand *)
static PyVTKSpecialType * AddSpecialTypeToMap(PyTypeObject *pytype, PyMethodDef *methods, PyMethodDef *constructors, const char *docstring[], PyVTKSpecialCopyFunc copyfunc)
static PyObject * BuildDocString(const char *docstring[])
abstract base class for most VTK objects
void vtkPythonUtilDelete()
static void RemoveObjectFromMap(PyObject *obj)
static PyVTKSpecialType * FindSpecialType(const char *classname)
static void * UnmanglePointer(char *ptrText, int *len, const char *type)
static void RemoveNamespaceFromMap(PyObject *o)
static char * ManglePointer(const void *ptr, const char *type)
friend void vtkPythonUtilDelete()
String class that stores Unicode text.
static void AddNamespaceToMap(PyObject *o)
static void * GetPointerFromSpecialObject(PyObject *obj, const char *result_type, PyObject **newobj)
A atomic type representing the union of many types.
VTKWRAPPINGPYTHONCORE_EXPORT void vtkPythonVoidFunc(void *)
static PyObject * FindClass(const char *classname)
static PyObject * GetObjectFromObject(PyObject *arg, const char *type)
static void * SIPGetPointerFromObject(PyObject *obj, const char *classname)
static void AddClassToMap(PyObject *obj, const char *classname)
Wrapper around std::string to keep symbols short.
GLuint GLuint GLsizei GLenum type
static PyObject * GetObjectFromPointer(vtkObjectBase *ptr)
static void RegisterPythonCommand(vtkPythonCommand *)