19 #ifndef vtkPythonUtil_h
20 #define vtkPythonUtil_h
22 #include "vtkPython.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;
36 class vtkPythonEnumMap;
49 static const char *PythonicClassName(
const char *classname);
52 static const char *StripModule(
const char *tpname);
57 static PyVTKClass *AddClassToMap(
58 PyTypeObject *pytype, PyMethodDef *methods,
59 const char *classname, vtknewfunc constructor);
63 static PyVTKClass *FindClass(
const char *classname);
76 const char *classname);
88 static void *SIPGetPointerFromObject(
PyObject *obj,
const char *classname);
93 static PyObject *SIPGetObjectFromPointer(
94 const void *ptr,
const char* classname,
bool is_new);
108 static void RemoveObjectFromMap(
PyObject *obj);
113 static PyVTKSpecialType *AddSpecialTypeToMap(
114 PyTypeObject *pytype, PyMethodDef *methods, PyMethodDef *constructors,
115 vtkcopyfunc copyfunc);
119 static PyVTKSpecialType *FindSpecialType(
const char *classname);
129 static void *GetPointerFromSpecialObject(
135 static void AddNamespaceToMap(
PyObject *o);
139 static void RemoveNamespaceFromMap(
PyObject *o);
145 static void AddEnumToMap(PyTypeObject *o);
148 static PyTypeObject *FindEnum(
const char *name);
152 static PyObject *BuildDocString(
const char *docstring[]);
155 static char *ManglePointer(
const void *ptr,
const char *type);
158 static void *UnmanglePointer(
char *ptrText,
int *len,
const char *type);
179 vtkPythonObjectMap *ObjectMap;
180 vtkPythonGhostMap *GhostMap;
181 vtkPythonClassMap *ClassMap;
182 vtkPythonSpecialTypeMap *SpecialTypeMap;
183 vtkPythonNamespaceMap *NamespaceMap;
184 vtkPythonEnumMap *EnumMap;
185 vtkPythonCommandList *PythonCommandList;
188 friend void vtkPythonUtilCreateIfNeeded();
Wrapper around std::string to keep symbols short.
void vtkPythonUtilDelete()
A atomic type representing the union of many types.
VTKWRAPPINGPYTHONCORE_EXPORT void vtkPythonVoidFuncArgDelete(void *)
#define VTKWRAPPINGPYTHONCORE_EXPORT
abstract base class for most VTK objects
VTKWRAPPINGPYTHONCORE_EXPORT void vtkPythonVoidFunc(void *)
String class that stores Unicode text.