38 PyModule_AddObjectRef(
44 PyModule_AddObjectRef(
54 UnaryFunction1DUnsigned___doc__,
55 "Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DUnsigned`\n"
57 "Base class for unary functions (functors) that work on\n"
58 ":class:`Interface1D` and return an int value.\n"
60 ".. method:: __init__()\n"
61 " __init__(integration_type)\n"
63 " Builds a unary 1D function using the default constructor\n"
64 " or the integration method given as an argument.\n"
66 " :arg integration_type: An integration method.\n"
67 " :type integration_type: :class:`IntegrationType`\n");
73 static const char *kwlist[] = {
"integration",
nullptr};
74 PyObject *obj =
nullptr;
76 if (!PyArg_ParseTupleAndKeywords(
89 self->uf1D_unsigned->py_uf1D = (PyObject *)
self;
96 delete self->uf1D_unsigned;
102 return PyUnicode_FromFormat(
103 "type: %s - address: %p", Py_TYPE(
self)->tp_name,
self->uf1D_unsigned);
110 static const char *kwlist[] = {
"inter",
nullptr};
111 PyObject *obj =
nullptr;
113 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"O!", (
char **)kwlist, &
Interface1D_Type, &obj)) {
118 PyErr_SetString(PyExc_TypeError,
"__call__ method not properly overridden");
122 if (!PyErr_Occurred()) {
123 string class_name(Py_TYPE(
self)->tp_name);
124 PyErr_SetString(PyExc_RuntimeError, (class_name +
" __call__ method failed").c_str());
128 return PyLong_FromLong(
self->uf1D_unsigned->result);
135 integration_type_doc,
136 "The integration method.\n"
138 ":type: :class:`IntegrationType`");
150 PyErr_SetString(PyExc_TypeError,
"value must be an IntegrationType");
161 integration_type_doc,
163 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
169 PyVarObject_HEAD_INIT(
nullptr, 0)
170 "UnaryFunction1DUnsigned",
188 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
189 UnaryFunction1DUnsigned___doc__,
IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj)
PyObject * BPy_IntegrationType_from_IntegrationType(IntegrationType i)
PyTypeObject IntegrationType_Type
#define BPy_IntegrationType_Check(v)
PyTypeObject Interface1D_Type
PyTypeObject QuantitativeInvisibilityF1D_Type
static int UnaryFunction1DUnsigned___init__(BPy_UnaryFunction1DUnsigned *self, PyObject *args, PyObject *kwds)
static PyGetSetDef BPy_UnaryFunction1DUnsigned_getseters[]
static int integration_type_set(BPy_UnaryFunction1DUnsigned *self, PyObject *value, void *)
static PyObject * UnaryFunction1DUnsigned___repr__(BPy_UnaryFunction1DUnsigned *self)
static PyObject * integration_type_get(BPy_UnaryFunction1DUnsigned *self, void *)
PyDoc_STRVAR(UnaryFunction1DUnsigned___doc__, "Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DUnsigned`\n" "\n" "Base class for unary functions (functors) that work on\n" ":class:`Interface1D` and return an int value.\n" "\n" ".. method:: __init__()\n" " __init__(integration_type)\n" "\n" " Builds a unary 1D function using the default constructor\n" " or the integration method given as an argument.\n" "\n" " :arg integration_type: An integration method.\n" " :type integration_type: :class:`IntegrationType`\n")
static PyObject * UnaryFunction1DUnsigned___call__(BPy_UnaryFunction1DUnsigned *self, PyObject *args, PyObject *kwds)
int UnaryFunction1DUnsigned_Init(PyObject *module)
PyTypeObject UnaryFunction1DUnsigned_Type
static void UnaryFunction1DUnsigned___dealloc__(BPy_UnaryFunction1DUnsigned *self)
PyTypeObject UnaryFunction1D_Type
static struct PyModuleDef module