// python wrapper for vtkVariantArray // #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 "vtkVariantArray.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkVariantArray(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkVariantArray_ClassNew(); } #ifndef DECLARED_PyvtkAbstractArray_ClassNew extern "C" { PyObject *PyvtkAbstractArray_ClassNew(); } #define DECLARED_PyvtkAbstractArray_ClassNew #endif static const char *PyvtkVariantArray_Doc = "vtkVariantArray - An array holding vtkVariants.\n\n" "Superclass: vtkAbstractArray\n\n" "@par Thanks: Thanks to Patricia Crossno, Ken Moreland, Andrew Wilson\n" "and Brian Wylie from Sandia National Laboratories for their help in\n" "developing this class.\n\n"; static PyObject * PyvtkVariantArray_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkVariantArray::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkVariantArray_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *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->vtkVariantArray::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkVariantArray_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkVariantArray *tempr = vtkVariantArray::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkVariantArray_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkVariantArray *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkVariantArray::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 * PyvtkVariantArray_Allocate(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Allocate"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); vtkIdType temp0; vtkIdType temp1 = 1000; PyObject *result = nullptr; if (op && ap.CheckArgCount(1, 2) && ap.GetValue(temp0) && (ap.NoArgsLeft() || ap.GetValue(temp1))) { int tempr = (ap.IsBound() ? op->Allocate(temp0, temp1) : op->vtkVariantArray::Allocate(temp0, temp1)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkVariantArray_Initialize(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Initialize"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->Initialize(); } else { op->vtkVariantArray::Initialize(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkVariantArray_GetDataType(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetDataType"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetDataType() : op->vtkVariantArray::GetDataType()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkVariantArray_GetDataTypeSize(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetDataTypeSize"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetDataTypeSize() : op->vtkVariantArray::GetDataTypeSize()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkVariantArray_GetElementComponentSize(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetElementComponentSize"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetElementComponentSize() : op->vtkVariantArray::GetElementComponentSize()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkVariantArray_SetNumberOfTuples(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetNumberOfTuples"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); vtkIdType temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetNumberOfTuples(temp0); } else { op->vtkVariantArray::SetNumberOfTuples(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkVariantArray_SetTuple(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetTuple"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); vtkIdType temp0; vtkIdType temp1; vtkAbstractArray *temp2 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetValue(temp0) && ap.GetValue(temp1) && ap.GetVTKObject(temp2, "vtkAbstractArray")) { if (ap.IsBound()) { op->SetTuple(temp0, temp1, temp2); } else { op->vtkVariantArray::SetTuple(temp0, temp1, temp2); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkVariantArray_InsertTuple(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "InsertTuple"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); vtkIdType temp0; vtkIdType temp1; vtkAbstractArray *temp2 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetValue(temp0) && ap.GetValue(temp1) && ap.GetVTKObject(temp2, "vtkAbstractArray")) { if (ap.IsBound()) { op->InsertTuple(temp0, temp1, temp2); } else { op->vtkVariantArray::InsertTuple(temp0, temp1, temp2); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkVariantArray_InsertTuples_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "InsertTuples"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); vtkIdList *temp0 = nullptr; vtkIdList *temp1 = nullptr; vtkAbstractArray *temp2 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetVTKObject(temp0, "vtkIdList") && ap.GetVTKObject(temp1, "vtkIdList") && ap.GetVTKObject(temp2, "vtkAbstractArray")) { if (ap.IsBound()) { op->InsertTuples(temp0, temp1, temp2); } else { op->vtkVariantArray::InsertTuples(temp0, temp1, temp2); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkVariantArray_InsertTuples_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "InsertTuples"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); vtkIdType temp0; vtkIdType temp1; vtkIdType temp2; vtkAbstractArray *temp3 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(4) && ap.GetValue(temp0) && ap.GetValue(temp1) && ap.GetValue(temp2) && ap.GetVTKObject(temp3, "vtkAbstractArray")) { if (ap.IsBound()) { op->InsertTuples(temp0, temp1, temp2, temp3); } else { op->vtkVariantArray::InsertTuples(temp0, temp1, temp2, temp3); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkVariantArray_InsertTuples(PyObject *self, PyObject *args) { int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 3: return PyvtkVariantArray_InsertTuples_s1(self, args); case 4: return PyvtkVariantArray_InsertTuples_s2(self, args); } vtkPythonArgs::ArgCountError(nargs, "InsertTuples"); return nullptr; } static PyObject * PyvtkVariantArray_InsertNextTuple(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "InsertNextTuple"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); vtkIdType temp0; vtkAbstractArray *temp1 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetVTKObject(temp1, "vtkAbstractArray")) { vtkIdType tempr = (ap.IsBound() ? op->InsertNextTuple(temp0, temp1) : op->vtkVariantArray::InsertNextTuple(temp0, temp1)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkVariantArray_GetVoidPointer(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetVoidPointer"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); vtkIdType temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { void *tempr = (ap.IsBound() ? op->GetVoidPointer(temp0) : op->vtkVariantArray::GetVoidPointer(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkVariantArray_DeepCopy(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "DeepCopy"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); vtkAbstractArray *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkAbstractArray")) { if (ap.IsBound()) { op->DeepCopy(temp0); } else { op->vtkVariantArray::DeepCopy(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkVariantArray_InterpolateTuple_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "InterpolateTuple"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); vtkIdType temp0; vtkIdList *temp1 = nullptr; vtkAbstractArray *temp2 = nullptr; int size3 = ap.GetArgSize(3); vtkPythonArgs::Array store3(2*size3); double *temp3 = store3.Data(); double *save3 = (size3 == 0 ? nullptr : temp3 + size3); PyObject *result = nullptr; if (op && ap.CheckArgCount(4) && ap.GetValue(temp0) && ap.GetVTKObject(temp1, "vtkIdList") && ap.GetVTKObject(temp2, "vtkAbstractArray") && ap.GetArray(temp3, size3)) { ap.SaveArray(temp3, save3, size3); if (ap.IsBound()) { op->InterpolateTuple(temp0, temp1, temp2, temp3); } else { op->vtkVariantArray::InterpolateTuple(temp0, temp1, temp2, temp3); } if (ap.ArrayHasChanged(temp3, save3, size3) && !ap.ErrorOccurred()) { ap.SetArray(3, temp3, size3); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkVariantArray_InterpolateTuple_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "InterpolateTuple"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); vtkIdType temp0; vtkIdType temp1; vtkAbstractArray *temp2 = nullptr; vtkIdType temp3; vtkAbstractArray *temp4 = nullptr; double temp5; PyObject *result = nullptr; if (op && ap.CheckArgCount(6) && ap.GetValue(temp0) && ap.GetValue(temp1) && ap.GetVTKObject(temp2, "vtkAbstractArray") && ap.GetValue(temp3) && ap.GetVTKObject(temp4, "vtkAbstractArray") && ap.GetValue(temp5)) { if (ap.IsBound()) { op->InterpolateTuple(temp0, temp1, temp2, temp3, temp4, temp5); } else { op->vtkVariantArray::InterpolateTuple(temp0, temp1, temp2, temp3, temp4, temp5); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkVariantArray_InterpolateTuple(PyObject *self, PyObject *args) { int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 4: return PyvtkVariantArray_InterpolateTuple_s1(self, args); case 6: return PyvtkVariantArray_InterpolateTuple_s2(self, args); } vtkPythonArgs::ArgCountError(nargs, "InterpolateTuple"); return nullptr; } static PyObject * PyvtkVariantArray_Squeeze(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Squeeze"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->Squeeze(); } else { op->vtkVariantArray::Squeeze(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkVariantArray_Resize(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Resize"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); vtkIdType temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = (ap.IsBound() ? op->Resize(temp0) : op->vtkVariantArray::Resize(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkVariantArray_SetVoidArray_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetVoidArray"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); void *temp0 = nullptr; 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->SetVoidArray(temp0, temp1, temp2); } else { op->vtkVariantArray::SetVoidArray(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 * PyvtkVariantArray_SetVoidArray_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetVoidArray"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); void *temp0 = nullptr; 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->SetVoidArray(temp0, temp1, temp2, temp3); } else { op->vtkVariantArray::SetVoidArray(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 * PyvtkVariantArray_SetVoidArray(PyObject *self, PyObject *args) { int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 3: return PyvtkVariantArray_SetVoidArray_s1(self, args); case 4: return PyvtkVariantArray_SetVoidArray_s2(self, args); } vtkPythonArgs::ArgCountError(nargs, "SetVoidArray"); return nullptr; } static PyObject * PyvtkVariantArray_GetActualMemorySize(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetActualMemorySize"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { unsigned long tempr = (ap.IsBound() ? op->GetActualMemorySize() : op->vtkVariantArray::GetActualMemorySize()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkVariantArray_IsNumeric(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsNumeric"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->IsNumeric() : op->vtkVariantArray::IsNumeric()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkVariantArray_NewIterator(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewIterator"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkArrayIterator *tempr = (ap.IsBound() ? op->NewIterator() : op->vtkVariantArray::NewIterator()); 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 * PyvtkVariantArray_GetValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); vtkIdType temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { vtkVariant *tempr = (ap.IsBound() ? &op->GetValue(temp0) : &op->vtkVariantArray::GetValue(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildSpecialObject(tempr, "vtkVariant"); } } return result; } static PyObject * PyvtkVariantArray_SetValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); vtkIdType temp0; vtkVariant *temp1 = nullptr; PyObject *pobj1 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetSpecialObject(temp1, pobj1, "vtkVariant") && ap.CheckPrecond((0 <= temp0 && temp0 < op->GetNumberOfValues()), "0 <= id && id < this->GetNumberOfValues()")) { if (ap.IsBound()) { op->SetValue(temp0, *temp1); } else { op->vtkVariantArray::SetValue(temp0, *temp1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } Py_XDECREF(pobj1); return result; } static PyObject * PyvtkVariantArray_InsertValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "InsertValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); vtkIdType temp0; vtkVariant *temp1 = nullptr; PyObject *pobj1 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetSpecialObject(temp1, pobj1, "vtkVariant") && ap.CheckPrecond((0 <= temp0), "0 <= id")) { if (ap.IsBound()) { op->InsertValue(temp0, *temp1); } else { op->vtkVariantArray::InsertValue(temp0, *temp1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } Py_XDECREF(pobj1); return result; } static PyObject * PyvtkVariantArray_SetVariantValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetVariantValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); vtkIdType temp0; vtkVariant *temp1 = nullptr; PyObject *pobj1 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetSpecialObject(temp1, pobj1, "vtkVariant") && ap.CheckPrecond((0 <= temp0 && temp0 < op->GetNumberOfValues()), "0 <= idx && idx < GetNumberOfValues()")) { if (ap.IsBound()) { op->SetVariantValue(temp0, *temp1); } else { op->vtkVariantArray::SetVariantValue(temp0, *temp1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } Py_XDECREF(pobj1); return result; } static PyObject * PyvtkVariantArray_InsertVariantValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "InsertVariantValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); vtkIdType temp0; vtkVariant *temp1 = nullptr; PyObject *pobj1 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetSpecialObject(temp1, pobj1, "vtkVariant") && ap.CheckPrecond((0 <= temp0), "0 <= idx")) { if (ap.IsBound()) { op->InsertVariantValue(temp0, *temp1); } else { op->vtkVariantArray::InsertVariantValue(temp0, *temp1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } Py_XDECREF(pobj1); return result; } static PyObject * PyvtkVariantArray_InsertNextValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "InsertNextValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); vtkVariant *temp0 = nullptr; PyObject *pobj0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetSpecialObject(temp0, pobj0, "vtkVariant")) { vtkIdType tempr = (ap.IsBound() ? op->InsertNextValue(*temp0) : op->vtkVariantArray::InsertNextValue(*temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } Py_XDECREF(pobj0); return result; } static PyObject * PyvtkVariantArray_SetNumberOfValues(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetNumberOfValues"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *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->vtkVariantArray::SetNumberOfValues(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkVariantArray_GetNumberOfValues(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetNumberOfValues"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkIdType tempr = (ap.IsBound() ? op->GetNumberOfValues() : op->vtkVariantArray::GetNumberOfValues()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkVariantArray_LookupValue_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "LookupValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); vtkVariant *temp0 = nullptr; PyObject *pobj0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetSpecialObject(temp0, pobj0, "vtkVariant")) { vtkIdType tempr = (ap.IsBound() ? op->LookupValue(*temp0) : op->vtkVariantArray::LookupValue(*temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } Py_XDECREF(pobj0); return result; } static PyObject * PyvtkVariantArray_LookupValue_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "LookupValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); vtkVariant *temp0 = nullptr; PyObject *pobj0 = nullptr; vtkIdList *temp1 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetSpecialObject(temp0, pobj0, "vtkVariant") && ap.GetVTKObject(temp1, "vtkIdList")) { if (ap.IsBound()) { op->LookupValue(*temp0, temp1); } else { op->vtkVariantArray::LookupValue(*temp0, temp1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } Py_XDECREF(pobj0); return result; } static PyObject * PyvtkVariantArray_LookupValue(PyObject *self, PyObject *args) { int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 1: return PyvtkVariantArray_LookupValue_s1(self, args); case 2: return PyvtkVariantArray_LookupValue_s2(self, args); } vtkPythonArgs::ArgCountError(nargs, "LookupValue"); return nullptr; } static PyObject * PyvtkVariantArray_DataChanged(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "DataChanged"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->DataChanged(); } else { op->vtkVariantArray::DataChanged(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkVariantArray_DataElementChanged(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "DataElementChanged"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); vtkIdType temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->DataElementChanged(temp0); } else { op->vtkVariantArray::DataElementChanged(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkVariantArray_ClearLookup(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ClearLookup"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkVariantArray *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->ClearLookup(); } else { op->vtkVariantArray::ClearLookup(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyMethodDef PyvtkVariantArray_Methods[] = { {"IsTypeOf", PyvtkVariantArray_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", PyvtkVariantArray_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", PyvtkVariantArray_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkVariantArray\nC++: static vtkVariantArray *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkVariantArray_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkVariantArray\nC++: vtkVariantArray *NewInstance()\n\n"}, {"Allocate", PyvtkVariantArray_Allocate, METH_VARARGS, "V.Allocate(int, int) -> int\nC++: int Allocate(vtkIdType sz, vtkIdType ext=1000) override;\n\nAllocate memory for this array. Delete old storage only if\nnecessary. Note that ext is no longer used.\n"}, {"Initialize", PyvtkVariantArray_Initialize, METH_VARARGS, "V.Initialize()\nC++: void Initialize() override;\n\nRelease storage and reset array to initial state.\n"}, {"GetDataType", PyvtkVariantArray_GetDataType, METH_VARARGS, "V.GetDataType() -> int\nC++: int GetDataType() override;\n\nReturn the underlying data type. An integer indicating data type\nis returned as specified in vtkSetGet.h.\n"}, {"GetDataTypeSize", PyvtkVariantArray_GetDataTypeSize, METH_VARARGS, "V.GetDataTypeSize() -> int\nC++: int GetDataTypeSize() override;\n\nReturn the size of the underlying data type. For a bit, 1 is\nreturned. For string 0 is returned. Arrays with variable length\ncomponents return 0.\n"}, {"GetElementComponentSize", PyvtkVariantArray_GetElementComponentSize, METH_VARARGS, "V.GetElementComponentSize() -> int\nC++: int GetElementComponentSize() override;\n\nReturn the size, in bytes, of the lowest-level element of an\narray. For vtkDataArray and subclasses this is the size of the\ndata type. For vtkStringArray, this is\nsizeof(vtkStdString::value_type), which winds up being\nsizeof(char).\n"}, {"SetNumberOfTuples", PyvtkVariantArray_SetNumberOfTuples, METH_VARARGS, "V.SetNumberOfTuples(int)\nC++: void SetNumberOfTuples(vtkIdType number) override;\n\nSet the number of tuples (a component group) in the array. Note\nthat this may allocate space depending on the number of\ncomponents.\n"}, {"SetTuple", PyvtkVariantArray_SetTuple, METH_VARARGS, "V.SetTuple(int, int, vtkAbstractArray)\nC++: void SetTuple(vtkIdType i, vtkIdType j,\n vtkAbstractArray *source) override;\n\nSet the tuple at the ith location using the jth tuple in the\nsource array. This method assumes that the two arrays have the\nsame type and structure. Note that range checking and memory\nallocation is not performed; use in conjunction with\nSetNumberOfTuples() to allocate space.\n"}, {"InsertTuple", PyvtkVariantArray_InsertTuple, METH_VARARGS, "V.InsertTuple(int, int, vtkAbstractArray)\nC++: void InsertTuple(vtkIdType i, vtkIdType j,\n vtkAbstractArray *source) override;\n\nInsert the jth tuple in the source array, at ith location in this\narray. Note that memory allocation is performed as necessary to\nhold the data.\n"}, {"InsertTuples", PyvtkVariantArray_InsertTuples, METH_VARARGS, "V.InsertTuples(vtkIdList, vtkIdList, vtkAbstractArray)\nC++: void InsertTuples(vtkIdList *dstIds, vtkIdList *srcIds,\n vtkAbstractArray *source) override;\nV.InsertTuples(int, int, int, vtkAbstractArray)\nC++: void InsertTuples(vtkIdType dstStart, vtkIdType n,\n vtkIdType srcStart, vtkAbstractArray *source) override;\n\nCopy the tuples indexed in srcIds from the source array to the\ntuple locations indexed by dstIds in this array. Note that memory\nallocation is performed as necessary to hold the data.\n"}, {"InsertNextTuple", PyvtkVariantArray_InsertNextTuple, METH_VARARGS, "V.InsertNextTuple(int, vtkAbstractArray) -> int\nC++: vtkIdType InsertNextTuple(vtkIdType j,\n vtkAbstractArray *source) override;\n\nInsert the jth tuple in the source array, at the end in this\narray. Note that memory allocation is performed as necessary to\nhold the data. Returns the location at which the data was\ninserted.\n"}, {"GetVoidPointer", PyvtkVariantArray_GetVoidPointer, METH_VARARGS, "V.GetVoidPointer(int) -> void\nC++: void *GetVoidPointer(vtkIdType id) override;\n\nReturn a void pointer. For image pipeline interface and other\nspecial pointer manipulation.\n"}, {"DeepCopy", PyvtkVariantArray_DeepCopy, METH_VARARGS, "V.DeepCopy(vtkAbstractArray)\nC++: void DeepCopy(vtkAbstractArray *da) override;\n\nDeep copy of data. Implementation left to subclasses, which\nshould support as many type conversions as possible given the\ndata type.\n"}, {"InterpolateTuple", PyvtkVariantArray_InterpolateTuple, METH_VARARGS, "V.InterpolateTuple(int, vtkIdList, vtkAbstractArray, [float, ...])\nC++: void InterpolateTuple(vtkIdType i, vtkIdList *ptIndices,\n vtkAbstractArray *source, double *weights) override;\nV.InterpolateTuple(int, int, vtkAbstractArray, int,\n vtkAbstractArray, float)\nC++: void InterpolateTuple(vtkIdType i, vtkIdType id1,\n vtkAbstractArray *source1, vtkIdType id2,\n vtkAbstractArray *source2, double t) override;\n\nSet the ith tuple in this array as the interpolated tuple value,\ngiven the ptIndices in the source array and associated\ninterpolation weights. This method assumes that the two arrays\nare of the same type and strcuture.\n"}, {"Squeeze", PyvtkVariantArray_Squeeze, METH_VARARGS, "V.Squeeze()\nC++: void Squeeze() override;\n\nFree any unnecessary memory. Description: Resize object to just\nfit data requirement. Reclaims extra memory.\n"}, {"Resize", PyvtkVariantArray_Resize, METH_VARARGS, "V.Resize(int) -> int\nC++: int Resize(vtkIdType numTuples) override;\n\nResize the array while conserving the data. Returns 1 if\nresizing succeeded and 0 otherwise.\n"}, {"SetVoidArray", PyvtkVariantArray_SetVoidArray, METH_VARARGS, "V.SetVoidArray(void, int, int)\nC++: void SetVoidArray(void *arr, vtkIdType size, int save)\n override;\nV.SetVoidArray(void, int, int, int)\nC++: void SetVoidArray(void *arr, vtkIdType size, int save,\n int deleteM) override;\n\nThis method lets the user specify data to be held by the array. \nThe array argument is a pointer to the data. size is the size of\nthe array supplied by the user. Set save to 1 to keep the class\nfrom deleting the array when it cleans up or reallocates memory.\nThe class uses the actual array provided; it does not copy the\ndata from the supplied array.\n"}, {"GetActualMemorySize", PyvtkVariantArray_GetActualMemorySize, METH_VARARGS, "V.GetActualMemorySize() -> int\nC++: unsigned long GetActualMemorySize() override;\n\nReturn the memory in kibibytes (1024 bytes) consumed by this data\narray. Used to support streaming and reading/writing data. The\nvalue returned is guaranteed to be greater than or equal to the\nmemory required to actually represent the data represented by\nthis object. The information returned is valid only after the\npipeline has been updated.\n"}, {"IsNumeric", PyvtkVariantArray_IsNumeric, METH_VARARGS, "V.IsNumeric() -> int\nC++: int IsNumeric() override;\n\nSince each item can be of a different type, we say that a variant\narray is not numeric.\n"}, {"NewIterator", PyvtkVariantArray_NewIterator, METH_VARARGS, "V.NewIterator() -> vtkArrayIterator\nC++: vtkArrayIterator *NewIterator() override;\n\nSubclasses must override this method and provide the right kind\nof templated vtkArrayIteratorTemplate.\n"}, {"GetValue", PyvtkVariantArray_GetValue, METH_VARARGS, "V.GetValue(int) -> vtkVariant\nC++: vtkVariant &GetValue(vtkIdType id)\n\nGet the data at a particular index.\n"}, {"SetValue", PyvtkVariantArray_SetValue, METH_VARARGS, "V.SetValue(int, vtkVariant)\nC++: void SetValue(vtkIdType id, vtkVariant value)\n\nSet the data at a particular index. Does not do range checking.\nMake sure you use the method SetNumberOfValues() before inserting\ndata.\n"}, {"InsertValue", PyvtkVariantArray_InsertValue, METH_VARARGS, "V.InsertValue(int, vtkVariant)\nC++: void InsertValue(vtkIdType id, vtkVariant value)\n\nIf id < GetNumberOfValues(), overwrite the array at that index.\nIf id >= GetNumberOfValues(), expand the array size to id+1 and\nset the final value to the specified value.\n"}, {"SetVariantValue", PyvtkVariantArray_SetVariantValue, METH_VARARGS, "V.SetVariantValue(int, vtkVariant)\nC++: void SetVariantValue(vtkIdType idx, vtkVariant value)\n override;\n\nInsert a value into the array from a variant.\n"}, {"InsertVariantValue", PyvtkVariantArray_InsertVariantValue, METH_VARARGS, "V.InsertVariantValue(int, vtkVariant)\nC++: void InsertVariantValue(vtkIdType idx, vtkVariant value)\n override;\n\nSafely insert a value into the array from a variant.\n"}, {"InsertNextValue", PyvtkVariantArray_InsertNextValue, METH_VARARGS, "V.InsertNextValue(vtkVariant) -> int\nC++: vtkIdType InsertNextValue(vtkVariant value)\n\nExpand the array by one and set the value at that location.\nReturn the array index of the inserted value.\n"}, {"SetNumberOfValues", PyvtkVariantArray_SetNumberOfValues, METH_VARARGS, "V.SetNumberOfValues(int)\nC++: void SetNumberOfValues(vtkIdType number) override;\n\nSpecify the number of values for this object to hold. Does an\nallocation as well as setting the MaxId ivar. Used in conjunction\nwith SetValue() method for fast insertion.\n"}, {"GetNumberOfValues", PyvtkVariantArray_GetNumberOfValues, METH_VARARGS, "V.GetNumberOfValues() -> int\nC++: vtkIdType GetNumberOfValues()\n\nReturn the number of values in the array.\n"}, {"LookupValue", PyvtkVariantArray_LookupValue, METH_VARARGS, "V.LookupValue(vtkVariant) -> int\nC++: vtkIdType LookupValue(vtkVariant value) override;\nV.LookupValue(vtkVariant, vtkIdList)\nC++: void LookupValue(vtkVariant value, vtkIdList *ids) override;\n\nReturn the indices where a specific value appears.\n"}, {"DataChanged", PyvtkVariantArray_DataChanged, METH_VARARGS, "V.DataChanged()\nC++: void DataChanged() override;\n\nTell the array explicitly that the data has changed. This is only\nnecessary to call when you modify the array contents without\nusing the array's API (i.e. you retrieve a pointer to the data\nand modify the array contents). You need to call this so that\nthe fast lookup will know to rebuild itself. Otherwise, the\nlookup functions will give incorrect results.\n"}, {"DataElementChanged", PyvtkVariantArray_DataElementChanged, METH_VARARGS, "V.DataElementChanged(int)\nC++: virtual void DataElementChanged(vtkIdType id)\n\nTell the array explicitly that a single data element has changed.\nLike DataChanged(), then is only necessary when you modify the\narray contents without using the array's API.\n"}, {"ClearLookup", PyvtkVariantArray_ClearLookup, METH_VARARGS, "V.ClearLookup()\nC++: void ClearLookup() override;\n\nDelete the associated fast lookup data structure on this array,\nif it exists. The lookup will be rebuilt on the next call to a\nlookup function.\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkVariantArray_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkCommonCorePython.vtkVariantArray", // 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 PyvtkVariantArray_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 *PyvtkVariantArray_StaticNew() { return vtkVariantArray::New(); } PyObject *PyvtkVariantArray_ClassNew() { PyVTKClass_Add( &PyvtkVariantArray_Type, PyvtkVariantArray_Methods, "vtkVariantArray", &PyvtkVariantArray_StaticNew); PyTypeObject *pytype = &PyvtkVariantArray_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 *)PyvtkAbstractArray_ClassNew(); PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkVariantArray( PyObject *dict) { PyObject *o; o = PyvtkVariantArray_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkVariantArray", o) != 0) { Py_DECREF(o); } }