23 #include "../BPy_Convert.h"
24 #include "../Iterator/BPy_Interface0DIterator.h"
63 "Class hierarchy: :class:`UnaryFunction0D` > :class:`UnaryFunction0DUnsigned`\n"
65 "Base class for unary functions (functors) that work on\n"
66 ":class:`Interface0DIterator` and return an int value.\n"
68 ".. method:: __init__()\n"
70 " Default constructor.\n";
76 static const char *kwlist[] = {
nullptr};
78 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"", (
char **)kwlist)) {
82 self->uf0D_unsigned->py_uf0D = (PyObject *)
self;
88 delete self->uf0D_unsigned;
94 return PyUnicode_FromFormat(
95 "type: %s - address: %p", Py_TYPE(
self)->tp_name,
self->uf0D_unsigned);
102 static const char *kwlist[] = {
"it",
nullptr};
105 if (!PyArg_ParseTupleAndKeywords(
111 PyErr_SetString(PyExc_TypeError,
"__call__ method not properly overridden");
115 if (!PyErr_Occurred()) {
116 string class_name(Py_TYPE(
self)->tp_name);
117 PyErr_SetString(PyExc_RuntimeError, (class_name +
" __call__ method failed").c_str());
121 return PyLong_FromLong(
self->uf0D_unsigned->result);
127 PyVarObject_HEAD_INIT(
nullptr, 0)
"UnaryFunction0DUnsigned",
145 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
PyTypeObject Interface0DIterator_Type
PyTypeObject QuantitativeInvisibilityF0D_Type
static PyObject * UnaryFunction0DUnsigned___call__(BPy_UnaryFunction0DUnsigned *self, PyObject *args, PyObject *kwds)
static void UnaryFunction0DUnsigned___dealloc__(BPy_UnaryFunction0DUnsigned *self)
int UnaryFunction0DUnsigned_Init(PyObject *module)
static PyObject * UnaryFunction0DUnsigned___repr__(BPy_UnaryFunction0DUnsigned *self)
PyTypeObject UnaryFunction0DUnsigned_Type
static int UnaryFunction0DUnsigned___init__(BPy_UnaryFunction0DUnsigned *self, PyObject *args, PyObject *kwds)
static char UnaryFunction0DUnsigned___doc__[]
PyTypeObject UnaryFunction0D_Type
static struct PyModuleDef module