9 #include "../BPy_Convert.h"
10 #include "../BPy_IntegrationType.h"
11 #include "../BPy_Interface1D.h"
64 "Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DVoid`\n"
66 "Base class for unary functions (functors) working on\n"
67 ":class:`Interface1D`.\n"
69 ".. method:: __init__()\n"
70 " __init__(integration_type)\n"
72 " Builds a unary 1D function using either a default constructor\n"
73 " or the integration method given as an argument.\n"
75 " :arg integration_type: An integration method.\n"
76 " :type integration_type: :class:`IntegrationType`\n";
82 static const char *kwlist[] = {
"integration",
nullptr};
83 PyObject *obj =
nullptr;
85 if (!PyArg_ParseTupleAndKeywords(
97 self->uf1D_void->py_uf1D = (PyObject *)
self;
104 delete self->uf1D_void;
110 return PyUnicode_FromFormat(
"type: %s - address: %p", Py_TYPE(
self)->tp_name,
self->uf1D_void);
117 static const char *kwlist[] = {
"inter",
nullptr};
118 PyObject *obj =
nullptr;
120 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"O!", (
char **)kwlist, &
Interface1D_Type, &obj)) {
125 PyErr_SetString(PyExc_TypeError,
"__call__ method not properly overridden");
129 if (!PyErr_Occurred()) {
130 string class_name(Py_TYPE(
self)->tp_name);
131 PyErr_SetString(PyExc_RuntimeError, (class_name +
" __call__ method failed").c_str());
141 "The integration method.\n"
143 ":type: :class:`IntegrationType`");
155 PyErr_SetString(PyExc_TypeError,
"value must be an IntegrationType");
166 integration_type_doc,
168 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
174 PyVarObject_HEAD_INIT(
nullptr, 0)
"UnaryFunction1DVoid",
192 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
PyTypeObject ChainingTimeStampF1D_Type
PyObject * BPy_IntegrationType_from_IntegrationType(IntegrationType i)
IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj)
PyTypeObject IncrementChainingTimeStampF1D_Type
PyTypeObject IntegrationType_Type
#define BPy_IntegrationType_Check(v)
PyTypeObject Interface1D_Type
PyTypeObject TimeStampF1D_Type
static char UnaryFunction1DVoid___doc__[]
static PyObject * UnaryFunction1DVoid___call__(BPy_UnaryFunction1DVoid *self, PyObject *args, PyObject *kwds)
PyDoc_STRVAR(integration_type_doc, "The integration method.\n" "\n" ":type: :class:`IntegrationType`")
static PyObject * integration_type_get(BPy_UnaryFunction1DVoid *self, void *UNUSED(closure))
int UnaryFunction1DVoid_Init(PyObject *module)
static int integration_type_set(BPy_UnaryFunction1DVoid *self, PyObject *value, void *UNUSED(closure))
PyTypeObject UnaryFunction1DVoid_Type
static int UnaryFunction1DVoid___init__(BPy_UnaryFunction1DVoid *self, PyObject *args, PyObject *kwds)
static void UnaryFunction1DVoid___dealloc__(BPy_UnaryFunction1DVoid *self)
static PyObject * UnaryFunction1DVoid___repr__(BPy_UnaryFunction1DVoid *self)
static PyGetSetDef BPy_UnaryFunction1DVoid_getseters[]
PyTypeObject UnaryFunction1D_Type
static struct PyModuleDef module