9 #include "../BPy_Convert.h"
10 #include "../BPy_IntegrationType.h"
11 #include "../BPy_Interface1D.h"
50 "Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DEdgeNature`\n"
52 "Base class for unary functions (functors) that work on\n"
53 ":class:`Interface1D` and return a :class:`Nature` object.\n"
55 ".. method:: __init__()\n"
56 " __init__(integration_type)\n"
58 " Builds a unary 1D function using the default constructor\n"
59 " or the integration method given as an argument.\n"
61 " :arg integration_type: An integration method.\n"
62 " :type integration_type: :class:`IntegrationType`\n";
68 static const char *kwlist[] = {
"integration",
nullptr};
69 PyObject *obj =
nullptr;
71 if (!PyArg_ParseTupleAndKeywords(
84 self->uf1D_edgenature->py_uf1D = (PyObject *)
self;
91 delete self->uf1D_edgenature;
97 return PyUnicode_FromFormat(
98 "type: %s - address: %p", Py_TYPE(
self)->tp_name,
self->uf1D_edgenature);
105 static const char *kwlist[] = {
"inter",
nullptr};
106 PyObject *obj =
nullptr;
108 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"O!", (
char **)kwlist, &
Interface1D_Type, &obj)) {
113 PyErr_SetString(PyExc_TypeError,
"__call__ method not properly overridden");
117 if (!PyErr_Occurred()) {
118 string class_name(Py_TYPE(
self)->tp_name);
119 PyErr_SetString(PyExc_RuntimeError, (class_name +
" __call__ method failed").c_str());
129 "The integration method.\n"
131 ":type: :class:`IntegrationType`");
143 PyErr_SetString(PyExc_TypeError,
"value must be an IntegrationType");
154 integration_type_doc,
156 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
162 PyVarObject_HEAD_INIT(
nullptr, 0)
"UnaryFunction1DEdgeNature",
180 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
PyObject * BPy_IntegrationType_from_IntegrationType(IntegrationType i)
IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj)
PyObject * BPy_Nature_from_Nature(unsigned short n)
PyTypeObject CurveNatureF1D_Type
PyTypeObject IntegrationType_Type
#define BPy_IntegrationType_Check(v)
PyTypeObject Interface1D_Type
PyDoc_STRVAR(integration_type_doc, "The integration method.\n" "\n" ":type: :class:`IntegrationType`")
PyTypeObject UnaryFunction1DEdgeNature_Type
static void UnaryFunction1DEdgeNature___dealloc__(BPy_UnaryFunction1DEdgeNature *self)
static PyObject * UnaryFunction1DEdgeNature___repr__(BPy_UnaryFunction1DEdgeNature *self)
static int integration_type_set(BPy_UnaryFunction1DEdgeNature *self, PyObject *value, void *UNUSED(closure))
static PyGetSetDef BPy_UnaryFunction1DEdgeNature_getseters[]
int UnaryFunction1DEdgeNature_Init(PyObject *module)
static PyObject * integration_type_get(BPy_UnaryFunction1DEdgeNature *self, void *UNUSED(closure))
static char UnaryFunction1DEdgeNature___doc__[]
static int UnaryFunction1DEdgeNature___init__(BPy_UnaryFunction1DEdgeNature *self, PyObject *args, PyObject *kwds)
static PyObject * UnaryFunction1DEdgeNature___call__(BPy_UnaryFunction1DEdgeNature *self, PyObject *args, PyObject *kwds)
PyTypeObject UnaryFunction1D_Type
static struct PyModuleDef module