30 if (module ==
nullptr) {
37 PyModule_AddObjectRef(module,
"Iterator", (PyObject *)&
Iterator_Type);
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.");
138 PyErr_SetString(PyExc_RuntimeError,
"cannot increment any more");
147 Iterator_decrement_doc,
148 ".. method:: decrement()\n"
150 " Makes the iterator point the previous element.");
155 PyErr_SetString(PyExc_RuntimeError,
"cannot decrement any more");
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
PyDoc_STRVAR(FalseBP1D___doc__, "Class hierarchy: :class:`freestyle.types.BinaryPredicate1D` > :class:`FalseBP1D`\n" "\n" ".. method:: __call__(inter1, inter2)\n" "\n" " Always returns false.\n" "\n" " :arg inter1: The first Interface1D object.\n" " :type inter1: :class:`freestyle.types.Interface1D`\n" " :arg inter2: The second Interface1D object.\n" " :type inter2: :class:`freestyle.types.Interface1D`\n" " :return: False.\n" " :rtype: bool\n")
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 *)
PyTypeObject SVertexIterator_Type
PyTypeObject StrokeVertexIterator_Type
PyTypeObject ViewEdgeIterator_Type
PyTypeObject orientedViewEdgeIterator_Type
virtual bool isBegin() const
virtual bool isEnd() const
PyObject_HEAD Freestyle::Iterator * it