67 PyModule_AddObjectRef(
83 PyModule_AddObjectRef(
89 PyModule_AddObjectRef(
100 "Base class to define iterators.\n"
102 ".. method:: __init__()\n"
104 " Default constructor.");
108 static const char *kwlist[] = {
nullptr};
110 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"", (
char **)kwlist)) {
120 Py_TYPE(
self)->tp_free((PyObject *)
self);
125 return PyUnicode_FromFormat(
"type: %s - address: %p", Py_TYPE(
self)->tp_name,
self->it);
130 Iterator_increment_doc,
131 ".. method:: increment()\n"
133 " Makes the iterator point the next element.");
137 if (
self->it->isEnd()) {
138 PyErr_SetString(PyExc_RuntimeError,
"cannot increment any more");
141 self->it->increment();
147 Iterator_decrement_doc,
148 ".. method:: decrement()\n"
150 " Makes the iterator point the previous element.");
154 if (
self->it->isBegin()) {
155 PyErr_SetString(PyExc_RuntimeError,
"cannot decrement any more");
158 self->it->decrement();
164# pragma clang diagnostic push
165# pragma clang diagnostic ignored "-Wcast-function-type"
167# pragma GCC diagnostic push
168# pragma GCC diagnostic ignored "-Wcast-function-type"
175 {
nullptr,
nullptr, 0,
nullptr},
180# pragma clang diagnostic pop
182# pragma GCC diagnostic pop
191 "The string of the name of this iterator.\n"
197 return PyUnicode_FromString(Py_TYPE(
self)->tp_name);
202 Iterator_is_begin_doc,
203 "True if the iterator points to the first element.\n"
215 "True if the iterator points to the last element.\n"
225 {
"name", (getter)
Iterator_name_get, (setter)
nullptr, Iterator_name_doc,
nullptr},
228 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
234 PyVarObject_HEAD_INIT(
nullptr, 0)
253 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
PyTypeObject AdjacencyIterator_Type
PyTypeObject ChainPredicateIterator_Type
PyTypeObject ChainSilhouetteIterator_Type
PyTypeObject ChainingIterator_Type
PyObject * PyBool_from_bool(bool b)
PyTypeObject CurvePointIterator_Type
PyTypeObject Interface0DIterator_Type
static PyGetSetDef BPy_Iterator_getseters[]
static PyObject * Iterator_increment(BPy_Iterator *self)
static PyObject * Iterator_is_end_get(BPy_Iterator *self, void *)
static PyMethodDef BPy_Iterator_methods[]
static void Iterator_dealloc(BPy_Iterator *self)
static PyObject * Iterator_is_begin_get(BPy_Iterator *self, void *)
static int Iterator_init(BPy_Iterator *self, PyObject *args, PyObject *kwds)
PyTypeObject Iterator_Type
int Iterator_Init(PyObject *module)
static PyObject * Iterator_repr(BPy_Iterator *self)
static PyObject * Iterator_decrement(BPy_Iterator *self)
static PyObject * Iterator_name_get(BPy_Iterator *self, void *)
PyDoc_STRVAR(Iterator_doc, "Base class to define iterators.\n" "\n" ".. method:: __init__()\n" "\n" " Default constructor.")
PyTypeObject SVertexIterator_Type
PyTypeObject StrokeVertexIterator_Type
PyTypeObject ViewEdgeIterator_Type
PyTypeObject orientedViewEdgeIterator_Type
static struct PyModuleDef module