23 "Class hierarchy: :class:`Iterator` > :class:`ViewEdgeIterator`\n"
25 "Base class for iterators over ViewEdges of the :class:`ViewMap` Graph.\n"
26 "Basically the increment() operator of this class should be able to\n"
27 "take the decision of \"where\" (on which ViewEdge) to go when pointing\n"
28 "on a given ViewEdge.\n"
30 ".. method:: __init__(begin=None, orientation=True)\n"
31 " __init__(brother)\n"
33 " Builds a ViewEdgeIterator from a starting ViewEdge and its\n"
34 " orientation or the copy constructor.\n"
36 " :arg begin: The ViewEdge from where to start the iteration.\n"
37 " :type begin: :class:`ViewEdge` | None\n"
38 " :arg orientation: If true, we'll look for the next ViewEdge among\n"
39 " the ViewEdges that surround the ending ViewVertex of begin. If\n"
40 " false, we'll search over the ViewEdges surrounding the ending\n"
41 " ViewVertex of begin.\n"
42 " :type orientation: bool\n"
43 " :arg brother: A ViewEdgeIterator object.\n"
44 " :type brother: :class:`ViewEdgeIterator`");
51 *((PyObject **)
v) = obj;
57 static const char *kwlist_1[] = {
"brother",
nullptr};
58 static const char *kwlist_2[] = {
"begin",
"orientation",
nullptr};
59 PyObject *obj1 =
nullptr, *obj2 =
nullptr;
61 if (PyArg_ParseTupleAndKeywords(
66 else if ((
void)PyErr_Clear(),
67 (
void)(obj1 = obj2 =
nullptr),
68 PyArg_ParseTupleAndKeywords(
69 args, kwds,
"|O&O!", (
char **)kwlist_2,
check_begin, &obj1, &PyBool_Type, &obj2))
76 PyErr_SetString(PyExc_TypeError,
"invalid argument(s)");
85 ViewEdgeIterator_change_orientation_doc,
86 ".. method:: change_orientation()\n"
88 " Changes the current orientation.");
92 self->ve_it->changeOrientation();
98# pragma clang diagnostic push
99# pragma clang diagnostic ignored "-Wcast-function-type"
101# pragma GCC diagnostic push
102# pragma GCC diagnostic ignored "-Wcast-function-type"
107 {
"change_orientation",
110 ViewEdgeIterator_change_orientation_doc},
111 {
nullptr,
nullptr, 0,
nullptr},
116# pragma clang diagnostic pop
118# pragma GCC diagnostic pop
126 ViewEdgeIterator_object_doc,
127 "The ViewEdge object currently pointed by this iterator.\n"
129 ":type: :class:`ViewEdge`");
133 if (!
self->ve_it->isEnd()) {
134 PyErr_SetString(PyExc_RuntimeError,
"iteration has stopped");
146 ViewEdgeIterator_current_edge_doc,
147 "The ViewEdge object currently pointed by this iterator.\n"
149 ":type: :class:`ViewEdge`");
165 PyErr_SetString(PyExc_TypeError,
"value must be a ViewEdge");
174 ViewEdgeIterator_orientation_doc,
175 "The orientation of the pointed ViewEdge in the iteration.\n"
176 "If true, the iterator looks for the next ViewEdge among those ViewEdges\n"
177 "that surround the ending ViewVertex of the \"begin\" ViewEdge. If false,\n"
178 "the iterator searches over the ViewEdges surrounding the ending ViewVertex\n"
179 "of the \"begin\" ViewEdge.\n"
192 if (!PyBool_Check(value)) {
193 PyErr_SetString(PyExc_TypeError,
"value must be a boolean");
202 ViewEdgeIterator_begin_doc,
203 "The first ViewEdge used for the iteration.\n"
205 ":type: :class:`ViewEdge`");
221 PyErr_SetString(PyExc_TypeError,
"value must be a ViewEdge");
232 ViewEdgeIterator_object_doc,
237 ViewEdgeIterator_current_edge_doc,
242 ViewEdgeIterator_orientation_doc,
247 ViewEdgeIterator_begin_doc,
249 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
255 PyVarObject_HEAD_INIT(
nullptr, 0)
274 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
275 ViewEdgeIterator_doc,
static int check_begin(PyObject *obj, void *v)
bool bool_from_PyBool(PyObject *b)
PyObject * BPy_ViewEdge_from_ViewEdge(ViewEdge &ve)
PyObject * PyBool_from_bool(bool b)
PyTypeObject Iterator_Type
static int check_begin(PyObject *obj, void *v)
static PyObject * ViewEdgeIterator_orientation_get(BPy_ViewEdgeIterator *self, void *)
static int ViewEdgeIterator_current_edge_set(BPy_ViewEdgeIterator *self, PyObject *value, void *)
PyDoc_STRVAR(ViewEdgeIterator_doc, "Class hierarchy: :class:`Iterator` > :class:`ViewEdgeIterator`\n" "\n" "Base class for iterators over ViewEdges of the :class:`ViewMap` Graph.\n" "Basically the increment() operator of this class should be able to\n" "take the decision of \"where\" (on which ViewEdge) to go when pointing\n" "on a given ViewEdge.\n" "\n" ".. method:: __init__(begin=None, orientation=True)\n" " __init__(brother)\n" "\n" " Builds a ViewEdgeIterator from a starting ViewEdge and its\n" " orientation or the copy constructor.\n" "\n" " :arg begin: The ViewEdge from where to start the iteration.\n" " :type begin: :class:`ViewEdge` | None\n" " :arg orientation: If true, we'll look for the next ViewEdge among\n" " the ViewEdges that surround the ending ViewVertex of begin. If\n" " false, we'll search over the ViewEdges surrounding the ending\n" " ViewVertex of begin.\n" " :type orientation: bool\n" " :arg brother: A ViewEdgeIterator object.\n" " :type brother: :class:`ViewEdgeIterator`")
static PyObject * ViewEdgeIterator_change_orientation(BPy_ViewEdgeIterator *self)
static int ViewEdgeIterator_init(BPy_ViewEdgeIterator *self, PyObject *args, PyObject *kwds)
static PyMethodDef BPy_ViewEdgeIterator_methods[]
static PyObject * ViewEdgeIterator_current_edge_get(BPy_ViewEdgeIterator *self, void *)
PyTypeObject ViewEdgeIterator_Type
static PyGetSetDef BPy_ViewEdgeIterator_getseters[]
static int ViewEdgeIterator_orientation_set(BPy_ViewEdgeIterator *self, PyObject *value, void *)
static int ViewEdgeIterator_begin_set(BPy_ViewEdgeIterator *self, PyObject *value, void *)
static PyObject * ViewEdgeIterator_begin_get(BPy_ViewEdgeIterator *self, void *)
static PyObject * ViewEdgeIterator_object_get(BPy_ViewEdgeIterator *self, void *)
#define BPy_ViewEdge_Check(v)
ATTR_WARN_UNUSED_RESULT const BMVert * v