9 #include "../BPy_Convert.h"
10 #include "../Iterator/BPy_Interface0DIterator.h"
49 "Class hierarchy: :class:`UnaryFunction0D` > :class:`UnaryFunction0DUnsigned`\n"
51 "Base class for unary functions (functors) that work on\n"
52 ":class:`Interface0DIterator` and return an int value.\n"
54 ".. method:: __init__()\n"
56 " Default constructor.\n";
62 static const char *kwlist[] = {
nullptr};
64 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"", (
char **)kwlist)) {
68 self->uf0D_unsigned->py_uf0D = (PyObject *)
self;
74 delete self->uf0D_unsigned;
80 return PyUnicode_FromFormat(
81 "type: %s - address: %p", Py_TYPE(
self)->tp_name,
self->uf0D_unsigned);
88 static const char *kwlist[] = {
"it",
nullptr};
91 if (!PyArg_ParseTupleAndKeywords(
97 PyErr_SetString(PyExc_TypeError,
"__call__ method not properly overridden");
101 if (!PyErr_Occurred()) {
102 string class_name(Py_TYPE(
self)->tp_name);
103 PyErr_SetString(PyExc_RuntimeError, (class_name +
" __call__ method failed").c_str());
107 return PyLong_FromLong(
self->uf0D_unsigned->result);
113 PyVarObject_HEAD_INIT(
nullptr, 0)
"UnaryFunction0DUnsigned",
131 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