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`\n");
50 *((PyObject **)
v) = obj;
56 static const char *kwlist_1[] = {
"brother",
nullptr};
57 static const char *kwlist_2[] = {
"begin",
"orientation",
nullptr};
58 PyObject *obj1 =
nullptr, *obj2 =
nullptr;
60 if (PyArg_ParseTupleAndKeywords(
65 else if ((
void)PyErr_Clear(),
66 (
void)(obj1 = obj2 =
nullptr),
67 PyArg_ParseTupleAndKeywords(
68 args, kwds,
"|O&O!", (
char **)kwlist_2,
check_begin, &obj1, &PyBool_Type, &obj2))
75 PyErr_SetString(PyExc_TypeError,
"invalid argument(s)");
84 ViewEdgeIterator_change_orientation_doc,
85 ".. method:: change_orientation()\n"
87 " Changes the current orientation.\n");
90 self->ve_it->changeOrientation();
96# pragma clang diagnostic push
97# pragma clang diagnostic ignored "-Wcast-function-type"
99# pragma GCC diagnostic push
100# pragma GCC diagnostic ignored "-Wcast-function-type"
105 {
"change_orientation",
108 ViewEdgeIterator_change_orientation_doc},
109 {
nullptr,
nullptr, 0,
nullptr},
114# pragma clang diagnostic pop
116# pragma GCC diagnostic pop
124 ViewEdgeIterator_object_doc,
125 "The ViewEdge object currently pointed by this iterator.\n"
127 ":type: :class:`ViewEdge`\n");
130 if (!
self->ve_it->isEnd()) {
131 PyErr_SetString(PyExc_RuntimeError,
"iteration has stopped");
143 ViewEdgeIterator_current_edge_doc,
144 "The ViewEdge object currently pointed by this iterator.\n"
146 ":type: :class:`ViewEdge`\n");
161 PyErr_SetString(PyExc_TypeError,
"value must be a ViewEdge");
170 ViewEdgeIterator_orientation_doc,
171 "The orientation of the pointed ViewEdge in the iteration.\n"
172 "If true, the iterator looks for the next ViewEdge among those ViewEdges\n"
173 "that surround the ending ViewVertex of the \"begin\" ViewEdge. If false,\n"
174 "the iterator searches over the ViewEdges surrounding the ending ViewVertex\n"
175 "of the \"begin\" ViewEdge.\n"
187 if (!PyBool_Check(value)) {
188 PyErr_SetString(PyExc_TypeError,
"value must be a boolean");
197 ViewEdgeIterator_begin_doc,
198 "The first ViewEdge used for the iteration.\n"
200 ":type: :class:`ViewEdge`\n");
215 PyErr_SetString(PyExc_TypeError,
"value must be a ViewEdge");
226 ViewEdgeIterator_object_doc,
231 ViewEdgeIterator_current_edge_doc,
236 ViewEdgeIterator_orientation_doc,
241 ViewEdgeIterator_begin_doc,
243 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
249 PyVarObject_HEAD_INIT(
nullptr, 0)
268 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
269 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
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`\n")
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 *)
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