// python wrapper for vtkGraphLayout // #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 "vtkGraphLayout.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkGraphLayout(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkGraphLayout_ClassNew(); } #ifndef DECLARED_PyvtkGraphAlgorithm_ClassNew extern "C" { PyObject *PyvtkGraphAlgorithm_ClassNew(); } #define DECLARED_PyvtkGraphAlgorithm_ClassNew #endif static const char *PyvtkGraphLayout_Doc = "vtkGraphLayout - layout a graph in 2 or 3 dimensions\n\n" "Superclass: vtkGraphAlgorithm\n\n" "This class is a shell for many graph layout strategies which may be\n" "set using the SetLayoutStrategy() function. The layout strategies do\n" "the actual work.\n\n" ".SECION Thanks Thanks to Brian Wylie from Sandia National\n" "Laboratories for adding incremental layout capabilities.\n\n"; static PyObject * PyvtkGraphLayout_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkGraphLayout::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGraphLayout_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGraphLayout *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->vtkGraphLayout::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGraphLayout_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkGraphLayout *tempr = vtkGraphLayout::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkGraphLayout_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGraphLayout *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkGraphLayout *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkGraphLayout::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 * PyvtkGraphLayout_SetLayoutStrategy(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetLayoutStrategy"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGraphLayout *op = static_cast(vp); vtkGraphLayoutStrategy *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkGraphLayoutStrategy")) { if (ap.IsBound()) { op->SetLayoutStrategy(temp0); } else { op->vtkGraphLayout::SetLayoutStrategy(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGraphLayout_GetLayoutStrategy(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetLayoutStrategy"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGraphLayout *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkGraphLayoutStrategy *tempr = (ap.IsBound() ? op->GetLayoutStrategy() : op->vtkGraphLayout::GetLayoutStrategy()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkGraphLayout_IsLayoutComplete(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsLayoutComplete"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGraphLayout *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->IsLayoutComplete() : op->vtkGraphLayout::IsLayoutComplete()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGraphLayout_GetMTime(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetMTime"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGraphLayout *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { unsigned long tempr = (ap.IsBound() ? op->GetMTime() : op->vtkGraphLayout::GetMTime()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGraphLayout_GetZRange(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetZRange"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGraphLayout *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double tempr = (ap.IsBound() ? op->GetZRange() : op->vtkGraphLayout::GetZRange()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGraphLayout_SetZRange(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetZRange"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGraphLayout *op = static_cast(vp); double temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetZRange(temp0); } else { op->vtkGraphLayout::SetZRange(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGraphLayout_GetTransform(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetTransform"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGraphLayout *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkAbstractTransform *tempr = (ap.IsBound() ? op->GetTransform() : op->vtkGraphLayout::GetTransform()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkGraphLayout_SetTransform(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetTransform"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGraphLayout *op = static_cast(vp); vtkAbstractTransform *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkAbstractTransform")) { if (ap.IsBound()) { op->SetTransform(temp0); } else { op->vtkGraphLayout::SetTransform(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGraphLayout_SetUseTransform(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetUseTransform"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGraphLayout *op = static_cast(vp); bool temp0 = false; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetUseTransform(temp0); } else { op->vtkGraphLayout::SetUseTransform(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGraphLayout_GetUseTransform(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetUseTransform"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGraphLayout *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { bool tempr = (ap.IsBound() ? op->GetUseTransform() : op->vtkGraphLayout::GetUseTransform()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGraphLayout_UseTransformOn(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "UseTransformOn"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGraphLayout *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->UseTransformOn(); } else { op->vtkGraphLayout::UseTransformOn(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGraphLayout_UseTransformOff(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "UseTransformOff"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGraphLayout *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->UseTransformOff(); } else { op->vtkGraphLayout::UseTransformOff(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyMethodDef PyvtkGraphLayout_Methods[] = { {"IsTypeOf", PyvtkGraphLayout_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", PyvtkGraphLayout_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", PyvtkGraphLayout_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkGraphLayout\nC++: static vtkGraphLayout *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkGraphLayout_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkGraphLayout\nC++: vtkGraphLayout *NewInstance()\n\n"}, {"SetLayoutStrategy", PyvtkGraphLayout_SetLayoutStrategy, METH_VARARGS, "V.SetLayoutStrategy(vtkGraphLayoutStrategy)\nC++: void SetLayoutStrategy(vtkGraphLayoutStrategy *strategy)\n\nThe layout strategy to use during graph layout.\n"}, {"GetLayoutStrategy", PyvtkGraphLayout_GetLayoutStrategy, METH_VARARGS, "V.GetLayoutStrategy() -> vtkGraphLayoutStrategy\nC++: virtual vtkGraphLayoutStrategy *GetLayoutStrategy()\n\nThe layout strategy to use during graph layout.\n"}, {"IsLayoutComplete", PyvtkGraphLayout_IsLayoutComplete, METH_VARARGS, "V.IsLayoutComplete() -> int\nC++: virtual int IsLayoutComplete()\n\nAsk the layout algorithm if the layout is complete\n"}, {"GetMTime", PyvtkGraphLayout_GetMTime, METH_VARARGS, "V.GetMTime() -> int\nC++: vtkMTimeType GetMTime() override;\n\nGet the modification time of the layout algorithm.\n"}, {"GetZRange", PyvtkGraphLayout_GetZRange, METH_VARARGS, "V.GetZRange() -> float\nC++: virtual double GetZRange()\n\nSet the ZRange for the output data. If the initial layout is\nplanar (i.e. all z coordinates are zero), the coordinates will be\nevenly spaced from 0.0 to ZRange. The default is zero, which has\nno effect.\n"}, {"SetZRange", PyvtkGraphLayout_SetZRange, METH_VARARGS, "V.SetZRange(float)\nC++: virtual void SetZRange(double _arg)\n\nSet the ZRange for the output data. If the initial layout is\nplanar (i.e. all z coordinates are zero), the coordinates will be\nevenly spaced from 0.0 to ZRange. The default is zero, which has\nno effect.\n"}, {"GetTransform", PyvtkGraphLayout_GetTransform, METH_VARARGS, "V.GetTransform() -> vtkAbstractTransform\nC++: virtual vtkAbstractTransform *GetTransform()\n\nTransform the graph vertices after the layout.\n"}, {"SetTransform", PyvtkGraphLayout_SetTransform, METH_VARARGS, "V.SetTransform(vtkAbstractTransform)\nC++: virtual void SetTransform(vtkAbstractTransform *t)\n\nTransform the graph vertices after the layout.\n"}, {"SetUseTransform", PyvtkGraphLayout_SetUseTransform, METH_VARARGS, "V.SetUseTransform(bool)\nC++: virtual void SetUseTransform(bool _arg)\n\nWhether to use the specified transform after layout.\n"}, {"GetUseTransform", PyvtkGraphLayout_GetUseTransform, METH_VARARGS, "V.GetUseTransform() -> bool\nC++: virtual bool GetUseTransform()\n\nWhether to use the specified transform after layout.\n"}, {"UseTransformOn", PyvtkGraphLayout_UseTransformOn, METH_VARARGS, "V.UseTransformOn()\nC++: virtual void UseTransformOn()\n\nWhether to use the specified transform after layout.\n"}, {"UseTransformOff", PyvtkGraphLayout_UseTransformOff, METH_VARARGS, "V.UseTransformOff()\nC++: virtual void UseTransformOff()\n\nWhether to use the specified transform after layout.\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkGraphLayout_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkInfovisLayoutPython.vtkGraphLayout", // 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 PyvtkGraphLayout_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 *PyvtkGraphLayout_StaticNew() { return vtkGraphLayout::New(); } PyObject *PyvtkGraphLayout_ClassNew() { PyVTKClass_Add( &PyvtkGraphLayout_Type, PyvtkGraphLayout_Methods, "vtkGraphLayout", &PyvtkGraphLayout_StaticNew); PyTypeObject *pytype = &PyvtkGraphLayout_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 *)PyvtkGraphAlgorithm_ClassNew(); PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkGraphLayout( PyObject *dict) { PyObject *o; o = PyvtkGraphLayout_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkGraphLayout", o) != 0) { Py_DECREF(o); } }