// python wrapper for vtkDoubleArray // #define VTK_WRAPPING_CXX #define VTK_STREAMS_FWD_ONLY #include "vtkPythonArgs.h" #include "vtkPythonOverload.h" #include "vtkConfigure.h" #include #include #include "vtkVariant.h" #include "vtkIndent.h" #include "vtkDoubleArray.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkDoubleArray(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkDoubleArray_ClassNew(); } #ifndef DECLARED_PyvtkDataArray_ClassNew extern "C" { PyObject *PyvtkDataArray_ClassNew(); } #define DECLARED_PyvtkDataArray_ClassNew #endif static const char *PyvtkDoubleArray_Doc = "vtkDoubleArray - dynamic, self-adjusting array of double\n\n" "Superclass: vtkDataArray\n\n" "vtkDoubleArray is an array of values of type double. It provides\n" "methods for insertion and retrieval of values and will automatically\n" "resize itself to hold new data.\n\n"; static PyObject * PyvtkDoubleArray_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkDoubleArray::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkDoubleArray_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkDoubleArray *op = static_cast(vp); char *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = (ap.IsBound() ? op->IsA(temp0) : op->vtkDoubleArray::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkDoubleArray_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkDoubleArray *tempr = vtkDoubleArray::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkDoubleArray_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkDoubleArray *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkDoubleArray *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkDoubleArray::NewInstance()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); if (result && PyVTKObject_Check(result)) { PyVTKObject_GetObject(result)->UnRegister(0); PyVTKObject_SetFlag(result, VTK_PYTHON_IGNORE_UNREGISTER, 1); } } } return result; } static PyObject * PyvtkDoubleArray_GetDataType(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetDataType"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkDoubleArray *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetDataType() : op->vtkDoubleArray::GetDataType()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkDoubleArray_GetTypedTuple(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetTypedTuple"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkDoubleArray *op = static_cast(vp); vtkIdType temp0; int size1 = ap.GetArgSize(1); vtkPythonArgs::Array store1(2*size1); double *temp1 = store1.Data(); double *save1 = (size1 == 0 ? nullptr : temp1 + size1); PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetArray(temp1, size1) && ap.CheckSizeHint(1, size1, op->GetNumberOfComponents()) && ap.CheckPrecond((0 <= temp0 && temp0 < op->GetNumberOfTuples()), "0 <= i && i < GetNumberOfTuples()")) { ap.SaveArray(temp1, save1, size1); if (ap.IsBound()) { op->GetTypedTuple(temp0, temp1); } else { op->vtkDoubleArray::GetTypedTuple(temp0, temp1); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkDoubleArray_SetTypedTuple(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetTypedTuple"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkDoubleArray *op = static_cast(vp); vtkIdType temp0; int size1 = ap.GetArgSize(1); vtkPythonArgs::Array store1(size1); double *temp1 = store1.Data(); PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetArray(temp1, size1) && ap.CheckSizeHint(1, size1, op->GetNumberOfComponents()) && ap.CheckPrecond((0 <= temp0 && temp0 < op->GetNumberOfTuples()), "0 <= i && i < GetNumberOfTuples()")) { if (ap.IsBound()) { op->SetTypedTuple(temp0, temp1); } else { op->vtkDoubleArray::SetTypedTuple(temp0, temp1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkDoubleArray_InsertTypedTuple(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "InsertTypedTuple"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkDoubleArray *op = static_cast(vp); vtkIdType temp0; int size1 = ap.GetArgSize(1); vtkPythonArgs::Array store1(size1); double *temp1 = store1.Data(); PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetArray(temp1, size1) && ap.CheckSizeHint(1, size1, op->GetNumberOfComponents()) && ap.CheckPrecond((0 <= temp0), "0 <= i")) { if (ap.IsBound()) { op->InsertTypedTuple(temp0, temp1); } else { op->vtkDoubleArray::InsertTypedTuple(temp0, temp1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkDoubleArray_InsertNextTypedTuple(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "InsertNextTypedTuple"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkDoubleArray *op = static_cast(vp); int size0 = ap.GetArgSize(0); vtkPythonArgs::Array store0(size0); double *temp0 = store0.Data(); PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0) && ap.CheckSizeHint(0, size0, op->GetNumberOfComponents())) { vtkIdType tempr = (ap.IsBound() ? op->InsertNextTypedTuple(temp0) : op->vtkDoubleArray::InsertNextTypedTuple(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkDoubleArray_GetValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkDoubleArray *op = static_cast(vp); vtkIdType temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0) && ap.CheckPrecond((0 <= temp0 && temp0 < op->GetNumberOfValues()), "0 <= id && id < GetNumberOfValues()")) { double tempr = (ap.IsBound() ? op->GetValue(temp0) : op->vtkDoubleArray::GetValue(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkDoubleArray_SetValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkDoubleArray *op = static_cast(vp); vtkIdType temp0; double temp1; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetValue(temp1) && ap.CheckPrecond((0 <= temp0 && temp0 < op->GetNumberOfValues()), "0 <= id && id < GetNumberOfValues()")) { if (ap.IsBound()) { op->SetValue(temp0, temp1); } else { op->vtkDoubleArray::SetValue(temp0, temp1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkDoubleArray_SetNumberOfValues(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetNumberOfValues"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkDoubleArray *op = static_cast(vp); vtkIdType temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetNumberOfValues(temp0); } else { op->vtkDoubleArray::SetNumberOfValues(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkDoubleArray_InsertValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "InsertValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkDoubleArray *op = static_cast(vp); vtkIdType temp0; double temp1; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetValue(temp1) && ap.CheckPrecond((0 <= temp0), "0 <= id")) { if (ap.IsBound()) { op->InsertValue(temp0, temp1); } else { op->vtkDoubleArray::InsertValue(temp0, temp1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkDoubleArray_InsertNextValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "InsertNextValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkDoubleArray *op = static_cast(vp); double temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { vtkIdType tempr = (ap.IsBound() ? op->InsertNextValue(temp0) : op->vtkDoubleArray::InsertNextValue(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkDoubleArray_GetValueRange_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetValueRange"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkDoubleArray *op = static_cast(vp); int temp0; int sizer = 2; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { double *tempr = (ap.IsBound() ? op->GetValueRange(temp0) : op->vtkDoubleArray::GetValueRange(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildTuple(tempr, sizer); } } return result; } static PyObject * PyvtkDoubleArray_GetValueRange_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetValueRange"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkDoubleArray *op = static_cast(vp); int sizer = 2; PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double *tempr = (ap.IsBound() ? op->GetValueRange() : op->vtkDoubleArray::GetValueRange()); if (!ap.ErrorOccurred()) { result = ap.BuildTuple(tempr, sizer); } } return result; } static PyObject * PyvtkDoubleArray_GetValueRange(PyObject *self, PyObject *args) { int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 1: return PyvtkDoubleArray_GetValueRange_s1(self, args); case 0: return PyvtkDoubleArray_GetValueRange_s2(self, args); } vtkPythonArgs::ArgCountError(nargs, "GetValueRange"); return nullptr; } static PyObject * PyvtkDoubleArray_WritePointer(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "WritePointer"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkDoubleArray *op = static_cast(vp); vtkIdType temp0; vtkIdType temp1; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetValue(temp1)) { double *tempr = (ap.IsBound() ? op->WritePointer(temp0, temp1) : op->vtkDoubleArray::WritePointer(temp0, temp1)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkDoubleArray_GetPointer(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetPointer"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkDoubleArray *op = static_cast(vp); vtkIdType temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { double *tempr = (ap.IsBound() ? op->GetPointer(temp0) : op->vtkDoubleArray::GetPointer(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkDoubleArray_SetArray_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetArray"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkDoubleArray *op = static_cast(vp); double *temp0; Py_buffer pbuf0 = VTK_PYBUFFER_INITIALIZER; vtkIdType temp1; int temp2; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetBuffer(temp0, &pbuf0) && ap.GetValue(temp1) && ap.GetValue(temp2)) { if (ap.IsBound()) { op->SetArray(temp0, temp1, temp2); } else { op->vtkDoubleArray::SetArray(temp0, temp1, temp2); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } #if PY_VERSION_HEX >= 0x02060000 if (pbuf0.obj != 0) { PyBuffer_Release(&pbuf0); } #endif return result; } static PyObject * PyvtkDoubleArray_SetArray_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetArray"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkDoubleArray *op = static_cast(vp); double *temp0; Py_buffer pbuf0 = VTK_PYBUFFER_INITIALIZER; vtkIdType temp1; int temp2; int temp3; PyObject *result = nullptr; if (op && ap.CheckArgCount(4) && ap.GetBuffer(temp0, &pbuf0) && ap.GetValue(temp1) && ap.GetValue(temp2) && ap.GetValue(temp3)) { if (ap.IsBound()) { op->SetArray(temp0, temp1, temp2, temp3); } else { op->vtkDoubleArray::SetArray(temp0, temp1, temp2, temp3); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } #if PY_VERSION_HEX >= 0x02060000 if (pbuf0.obj != 0) { PyBuffer_Release(&pbuf0); } #endif return result; } static PyObject * PyvtkDoubleArray_SetArray(PyObject *self, PyObject *args) { int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 3: return PyvtkDoubleArray_SetArray_s1(self, args); case 4: return PyvtkDoubleArray_SetArray_s2(self, args); } vtkPythonArgs::ArgCountError(nargs, "SetArray"); return nullptr; } static PyObject * PyvtkDoubleArray_FastDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "FastDownCast"); vtkAbstractArray *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkAbstractArray")) { vtkDoubleArray *tempr = vtkDoubleArray::FastDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkDoubleArray_GetDataTypeValueMin(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "GetDataTypeValueMin"); PyObject *result = nullptr; if (ap.CheckArgCount(0)) { double tempr = vtkDoubleArray::GetDataTypeValueMin(); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkDoubleArray_GetDataTypeValueMax(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "GetDataTypeValueMax"); PyObject *result = nullptr; if (ap.CheckArgCount(0)) { double tempr = vtkDoubleArray::GetDataTypeValueMax(); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyMethodDef PyvtkDoubleArray_Methods[] = { {"IsTypeOf", PyvtkDoubleArray_IsTypeOf, METH_VARARGS, "V.IsTypeOf(string) -> int\nC++: static vtkTypeBool IsTypeOf(const char *type)\n\nReturn 1 if this class type is the same type of (or a subclass\nof) the named class. Returns 0 otherwise. This method works in\ncombination with vtkTypeMacro found in vtkSetGet.h.\n"}, {"IsA", PyvtkDoubleArray_IsA, METH_VARARGS, "V.IsA(string) -> int\nC++: vtkTypeBool IsA(const char *type) override;\n\nReturn 1 if this class is the same type of (or a subclass of) the\nnamed class. Returns 0 otherwise. This method works in\ncombination with vtkTypeMacro found in vtkSetGet.h.\n"}, {"SafeDownCast", PyvtkDoubleArray_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkDoubleArray\nC++: static vtkDoubleArray *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkDoubleArray_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkDoubleArray\nC++: vtkDoubleArray *NewInstance()\n\n"}, {"GetDataType", PyvtkDoubleArray_GetDataType, METH_VARARGS, "V.GetDataType() -> int\nC++: int GetDataType()\n\nReturn the underlying data type. An integer indicating data type\nis returned as specified in vtkType.h.\n"}, {"GetTypedTuple", PyvtkDoubleArray_GetTypedTuple, METH_VARARGS, "V.GetTypedTuple(int, [float, ...])\nC++: void GetTypedTuple(vtkIdType i, double *tuple)\n\n"}, {"SetTypedTuple", PyvtkDoubleArray_SetTypedTuple, METH_VARARGS, "V.SetTypedTuple(int, (float, ...))\nC++: void SetTypedTuple(vtkIdType i, const double *tuple)\n\n"}, {"InsertTypedTuple", PyvtkDoubleArray_InsertTypedTuple, METH_VARARGS, "V.InsertTypedTuple(int, (float, ...))\nC++: void InsertTypedTuple(vtkIdType i, const double *tuple)\n\n"}, {"InsertNextTypedTuple", PyvtkDoubleArray_InsertNextTypedTuple, METH_VARARGS, "V.InsertNextTypedTuple((float, ...)) -> int\nC++: vtkIdType InsertNextTypedTuple(const double *tuple)\n\n"}, {"GetValue", PyvtkDoubleArray_GetValue, METH_VARARGS, "V.GetValue(int) -> float\nC++: double GetValue(vtkIdType id)\n\n"}, {"SetValue", PyvtkDoubleArray_SetValue, METH_VARARGS, "V.SetValue(int, float)\nC++: void SetValue(vtkIdType id, double value)\n\n"}, {"SetNumberOfValues", PyvtkDoubleArray_SetNumberOfValues, METH_VARARGS, "V.SetNumberOfValues(int)\nC++: void SetNumberOfValues(vtkIdType number)\n\nSpecify the number of values (tuples * components) for this\nobject to hold. Does an allocation as well as setting the MaxId\nivar. Used in conjunction with SetValue() method for fast\ninsertion.\n"}, {"InsertValue", PyvtkDoubleArray_InsertValue, METH_VARARGS, "V.InsertValue(int, float)\nC++: void InsertValue(vtkIdType id, double f)\n\n"}, {"InsertNextValue", PyvtkDoubleArray_InsertNextValue, METH_VARARGS, "V.InsertNextValue(float) -> int\nC++: vtkIdType InsertNextValue(double f)\n\n"}, {"GetValueRange", PyvtkDoubleArray_GetValueRange, METH_VARARGS, "V.GetValueRange(int) -> (float, float)\nC++: double *GetValueRange(int comp)\nV.GetValueRange() -> (float, float)\nC++: double *GetValueRange()\n\n"}, {"WritePointer", PyvtkDoubleArray_WritePointer, METH_VARARGS, "V.WritePointer(int, int) -> (float, ...)\nC++: double *WritePointer(vtkIdType id, vtkIdType number)\n\n"}, {"GetPointer", PyvtkDoubleArray_GetPointer, METH_VARARGS, "V.GetPointer(int) -> (float, ...)\nC++: double *GetPointer(vtkIdType id)\n\n"}, {"SetArray", PyvtkDoubleArray_SetArray, METH_VARARGS, "V.SetArray(float, int, int)\nC++: void SetArray(double *array, vtkIdType size, int save)\nV.SetArray(float, int, int, int)\nC++: void SetArray(double *array, vtkIdType size, int save,\n int deleteMethod)\n\n"}, {"FastDownCast", PyvtkDoubleArray_FastDownCast, METH_VARARGS, "V.FastDownCast(vtkAbstractArray) -> vtkDoubleArray\nC++: static vtkDoubleArray *FastDownCast(vtkAbstractArray *source)\n\nA faster alternative to SafeDownCast for downcasting\nvtkAbstractArrays.\n"}, {"GetDataTypeValueMin", PyvtkDoubleArray_GetDataTypeValueMin, METH_VARARGS, "V.GetDataTypeValueMin() -> float\nC++: static double GetDataTypeValueMin()\n\nGet the minimum data value in its native type.\n"}, {"GetDataTypeValueMax", PyvtkDoubleArray_GetDataTypeValueMax, METH_VARARGS, "V.GetDataTypeValueMax() -> float\nC++: static double GetDataTypeValueMax()\n\nGet the maximum data value in its native type.\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkDoubleArray_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkCommonCorePython.vtkDoubleArray", // tp_name sizeof(PyVTKObject), // tp_basicsize 0, // tp_itemsize PyVTKObject_Delete, // tp_dealloc 0, // tp_print nullptr, // tp_getattr nullptr, // tp_setattr nullptr, // tp_compare PyVTKObject_Repr, // tp_repr nullptr, // tp_as_number nullptr, // tp_as_sequence nullptr, // tp_as_mapping nullptr, // tp_hash nullptr, // tp_call PyVTKObject_String, // tp_str PyObject_GenericGetAttr, // tp_getattro PyObject_GenericSetAttr, // tp_setattro &PyVTKObject_AsBuffer, // tp_as_buffer Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_BASETYPE, // tp_flags PyvtkDoubleArray_Doc, // tp_doc PyVTKObject_Traverse, // tp_traverse nullptr, // tp_clear nullptr, // tp_richcompare offsetof(PyVTKObject, vtk_weakreflist), // tp_weaklistoffset nullptr, // tp_iter nullptr, // tp_iternext nullptr, // tp_methods nullptr, // tp_members PyVTKObject_GetSet, // tp_getset nullptr, // tp_base nullptr, // tp_dict nullptr, // tp_descr_get nullptr, // tp_descr_set offsetof(PyVTKObject, vtk_dict), // tp_dictoffset nullptr, // tp_init nullptr, // tp_alloc PyVTKObject_New, // tp_new PyObject_GC_Del, // tp_free nullptr, // tp_is_gc nullptr, // tp_bases nullptr, // tp_mro nullptr, // tp_cache nullptr, // tp_subclasses nullptr, // tp_weaklist VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED }; static vtkObjectBase *PyvtkDoubleArray_StaticNew() { return vtkDoubleArray::New(); } PyObject *PyvtkDoubleArray_ClassNew() { PyVTKClass_Add( &PyvtkDoubleArray_Type, PyvtkDoubleArray_Methods, "vtkDoubleArray", &PyvtkDoubleArray_StaticNew); PyTypeObject *pytype = &PyvtkDoubleArray_Type; if ((pytype->tp_flags & Py_TPFLAGS_READY) != 0) { return (PyObject *)pytype; } #if !defined(VTK_PY3K) && PY_VERSION_HEX >= 0x02060000 pytype->tp_flags |= Py_TPFLAGS_HAVE_NEWBUFFER; #endif pytype->tp_base = (PyTypeObject *)PyvtkDataArray_ClassNew(); PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkDoubleArray( PyObject *dict) { PyObject *o; o = PyvtkDoubleArray_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkDoubleArray", o) != 0) { Py_DECREF(o); } }