22 AdjacencyIterator_doc,
23 "Class hierarchy: :class:`Iterator` > :class:`AdjacencyIterator`\n"
25 "Class for representing adjacency iterators used in the chaining\n"
26 "process. An AdjacencyIterator is created in the increment() and\n"
27 "decrement() methods of a :class:`ChainingIterator` and passed to the\n"
28 "traverse() method of the ChainingIterator.\n"
30 ".. method:: __init__()\n"
31 " __init__(brother)\n"
32 " __init__(vertex, restrict_to_selection=True, restrict_to_unvisited=True)\n"
34 " Builds an :class:`AdjacencyIterator` using the default constructor,\n"
35 " copy constructor or the overloaded constructor.\n"
37 " :arg brother: An AdjacencyIterator object.\n"
38 " :type brother: :class:`AdjacencyIterator`\n"
39 " :arg vertex: The vertex which is the next crossing.\n"
40 " :type vertex: :class:`ViewVertex`\n"
41 " :arg restrict_to_selection: Indicates whether to force the chaining\n"
42 " to stay within the set of selected ViewEdges or not.\n"
43 " :type restrict_to_selection: bool\n"
44 " :arg restrict_to_unvisited: Indicates whether a ViewEdge that has\n"
45 " already been chained must be ignored ot not.\n"
46 " :type restrict_to_unvisited: bool\n");
49 static const char *kwlist_1[] = {
"brother",
nullptr};
50 static const char *kwlist_2[] = {
51 "vertex",
"restrict_to_selection",
"restrict_to_unvisited",
nullptr};
52 PyObject *obj1 =
nullptr, *obj2 =
nullptr, *obj3 =
nullptr;
54 if (PyArg_ParseTupleAndKeywords(
59 self->at_start =
true;
66 else if ((
void)PyErr_Clear(),
67 (
void)(obj2 = obj3 =
nullptr),
68 PyArg_ParseTupleAndKeywords(args,
82 ((
BPy_ViewVertex *)obj1)->vv, restrictToSelection, restrictToUnvisited);
86 PyErr_SetString(PyExc_TypeError,
"invalid argument(s)");
96 self->at_start =
true;
97 return (PyObject *)
self;
102 if (
self->a_it->isEnd()) {
103 PyErr_SetNone(PyExc_StopIteration);
106 if (
self->at_start) {
107 self->at_start =
false;
110 self->a_it->increment();
111 if (
self->a_it->isEnd()) {
112 PyErr_SetNone(PyExc_StopIteration);
124 AdjacencyIterator_object_doc,
125 "The ViewEdge object currently pointed to by this iterator.\n"
127 ":type: :class:`ViewEdge`\n");
130 if (
self->a_it->isEnd()) {
131 PyErr_SetString(PyExc_RuntimeError,
"iteration has stopped");
143 AdjacencyIterator_is_incoming_doc,
144 "True if the current ViewEdge is coming towards the iteration vertex, and\n"
150 if (
self->a_it->isEnd()) {
151 PyErr_SetString(PyExc_RuntimeError,
"iteration has stopped");
161 AdjacencyIterator_is_incoming_doc,
166 AdjacencyIterator_object_doc,
168 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
174 PyVarObject_HEAD_INIT(
nullptr, 0)
193 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
194 AdjacencyIterator_doc,
static PyObject * AdjacencyIterator_iternext(BPy_AdjacencyIterator *self)
static PyObject * AdjacencyIterator_iter(BPy_AdjacencyIterator *self)
PyTypeObject AdjacencyIterator_Type
static int AdjacencyIterator_init(BPy_AdjacencyIterator *self, PyObject *args, PyObject *kwds)
static PyObject * AdjacencyIterator_is_incoming_get(BPy_AdjacencyIterator *self, void *)
static PyObject * AdjacencyIterator_object_get(BPy_AdjacencyIterator *self, void *)
PyDoc_STRVAR(AdjacencyIterator_doc, "Class hierarchy: :class:`Iterator` > :class:`AdjacencyIterator`\n" "\n" "Class for representing adjacency iterators used in the chaining\n" "process. An AdjacencyIterator is created in the increment() and\n" "decrement() methods of a :class:`ChainingIterator` and passed to the\n" "traverse() method of the ChainingIterator.\n" "\n" ".. method:: __init__()\n" " __init__(brother)\n" " __init__(vertex, restrict_to_selection=True, restrict_to_unvisited=True)\n" "\n" " Builds an :class:`AdjacencyIterator` using the default constructor,\n" " copy constructor or the overloaded constructor.\n" "\n" " :arg brother: An AdjacencyIterator object.\n" " :type brother: :class:`AdjacencyIterator`\n" " :arg vertex: The vertex which is the next crossing.\n" " :type vertex: :class:`ViewVertex`\n" " :arg restrict_to_selection: Indicates whether to force the chaining\n" " to stay within the set of selected ViewEdges or not.\n" " :type restrict_to_selection: bool\n" " :arg restrict_to_unvisited: Indicates whether a ViewEdge that has\n" " already been chained must be ignored ot not.\n" " :type restrict_to_unvisited: bool\n")
static PyGetSetDef BPy_AdjacencyIterator_getseters[]
bool bool_from_PyBool(PyObject *b)
PyObject * BPy_ViewEdge_from_ViewEdge(ViewEdge &ve)
PyObject * PyBool_from_bool(bool b)
PyTypeObject Iterator_Type
PyTypeObject ViewVertex_Type