23 #include "../BPy_Convert.h"
36 "Class hierarchy: :class:`Iterator` > :class:`orientedViewEdgeIterator`\n"
38 "Class representing an iterator over oriented ViewEdges around a\n"
39 ":class:`ViewVertex`. This iterator allows a CCW iteration (in the image\n"
40 "plane). An instance of an orientedViewEdgeIterator can only be\n"
41 "obtained from a ViewVertex by calling edges_begin() or edges_end().\n"
43 ".. method:: __init__()\n"
44 " __init__(iBrother)\n"
46 " Creates an :class:`orientedViewEdgeIterator` using either the\n"
47 " default constructor or the copy constructor.\n"
49 " :arg iBrother: An orientedViewEdgeIterator object.\n"
50 " :type iBrother: :class:`orientedViewEdgeIterator`");
56 static const char *kwlist[] = {
"brother",
nullptr};
57 PyObject *brother =
nullptr;
59 if (!PyArg_ParseTupleAndKeywords(
65 self->at_start =
true;
66 self->reversed =
false;
74 self->py_it.it =
self->ove_it;
81 self->at_start =
true;
82 return (PyObject *)
self;
88 if (
self->ove_it->isBegin()) {
89 PyErr_SetNone(PyExc_StopIteration);
92 self->ove_it->decrement();
95 if (
self->ove_it->isEnd()) {
96 PyErr_SetNone(PyExc_StopIteration);
100 self->at_start =
false;
103 self->ove_it->increment();
104 if (
self->ove_it->isEnd()) {
105 PyErr_SetNone(PyExc_StopIteration);
117 "The oriented ViewEdge (i.e., a tuple of the pointed ViewEdge and a boolean\n"
118 "value) currently pointed to by this iterator. If the boolean value is true,\n"
119 "the ViewEdge is incoming.\n"
121 ":type: (:class:`ViewEdge`, bool)");
126 if (
self->ove_it->isEnd()) {
127 PyErr_SetString(PyExc_RuntimeError,
"iteration has stopped");
137 orientedViewEdgeIterator_object_doc,
139 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
145 PyVarObject_HEAD_INIT(
nullptr, 0)
"orientedViewEdgeIterator",
163 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
164 orientedViewEdgeIterator_doc,
PyObject * BPy_directedViewEdge_from_directedViewEdge(ViewVertex::directedViewEdge &dve)
PyTypeObject Iterator_Type
static int orientedViewEdgeIterator_init(BPy_orientedViewEdgeIterator *self, PyObject *args, PyObject *kwds)
static PyObject * orientedViewEdgeIterator_iternext(BPy_orientedViewEdgeIterator *self)
PyDoc_STRVAR(orientedViewEdgeIterator_doc, "Class hierarchy: :class:`Iterator` > :class:`orientedViewEdgeIterator`\n" "\n" "Class representing an iterator over oriented ViewEdges around a\n" ":class:`ViewVertex`. This iterator allows a CCW iteration (in the image\n" "plane). An instance of an orientedViewEdgeIterator can only be\n" "obtained from a ViewVertex by calling edges_begin() or edges_end().\n" "\n" ".. method:: __init__()\n" " __init__(iBrother)\n" "\n" " Creates an :class:`orientedViewEdgeIterator` using either the\n" " default constructor or the copy constructor.\n" "\n" " :arg iBrother: An orientedViewEdgeIterator object.\n" " :type iBrother: :class:`orientedViewEdgeIterator`")
static PyObject * orientedViewEdgeIterator_object_get(BPy_orientedViewEdgeIterator *self, void *UNUSED(closure))
static PyObject * orientedViewEdgeIterator_iter(BPy_orientedViewEdgeIterator *self)
PyTypeObject orientedViewEdgeIterator_Type
static PyGetSetDef BPy_orientedViewEdgeIterator_getseters[]
pair< ViewEdge *, bool > directedViewEdge