23 #include "../BPy_Convert.h"
24 #include "../BPy_IntegrationType.h"
25 #include "../BPy_Interface1D.h"
63 "Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DVec3f`\n"
65 "Base class for unary functions (functors) that work on\n"
66 ":class:`Interface1D` and return a 3D vector.\n"
68 ".. method:: __init__()\n"
69 " __init__(integration_type)\n"
71 " Builds a unary 1D function using the default constructor\n"
72 " or the integration method given as an argument.\n"
74 " :arg integration_type: An integration method.\n"
75 " :type integration_type: :class:`IntegrationType`\n";
81 static const char *kwlist[] = {
"integration",
nullptr};
82 PyObject *obj =
nullptr;
84 if (!PyArg_ParseTupleAndKeywords(
96 self->uf1D_vec3f->py_uf1D = (PyObject *)
self;
103 delete self->uf1D_vec3f;
109 return PyUnicode_FromFormat(
"type: %s - address: %p", Py_TYPE(
self)->tp_name,
self->uf1D_vec3f);
116 static const char *kwlist[] = {
"inter",
nullptr};
117 PyObject *obj =
nullptr;
119 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"O!", (
char **)kwlist, &
Interface1D_Type, &obj)) {
124 PyErr_SetString(PyExc_TypeError,
"__call__ method not properly overridden");
128 if (!PyErr_Occurred()) {
129 string class_name(Py_TYPE(
self)->tp_name);
130 PyErr_SetString(PyExc_RuntimeError, (class_name +
" __call__ method failed").c_str());
140 "The integration method.\n"
142 ":type: :class:`IntegrationType`");
154 PyErr_SetString(PyExc_TypeError,
"value must be an IntegrationType");
165 integration_type_doc,
167 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
173 PyVarObject_HEAD_INIT(
nullptr, 0)
"UnaryFunction1DVec3f",
191 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
PyObject * Vector_from_Vec3f(Vec3f &vec)
PyObject * BPy_IntegrationType_from_IntegrationType(IntegrationType i)
IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj)
PyTypeObject IntegrationType_Type
#define BPy_IntegrationType_Check(v)
PyTypeObject Interface1D_Type
PyTypeObject Orientation3DF1D_Type
static char UnaryFunction1DVec3f___doc__[]
PyDoc_STRVAR(integration_type_doc, "The integration method.\n" "\n" ":type: :class:`IntegrationType`")
static PyObject * integration_type_get(BPy_UnaryFunction1DVec3f *self, void *UNUSED(closure))
static int integration_type_set(BPy_UnaryFunction1DVec3f *self, PyObject *value, void *UNUSED(closure))
int UnaryFunction1DVec3f_Init(PyObject *module)
static int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f *self, PyObject *args, PyObject *kwds)
static PyGetSetDef BPy_UnaryFunction1DVec3f_getseters[]
static PyObject * UnaryFunction1DVec3f___repr__(BPy_UnaryFunction1DVec3f *self)
PyTypeObject UnaryFunction1DVec3f_Type
static PyObject * UnaryFunction1DVec3f___call__(BPy_UnaryFunction1DVec3f *self, PyObject *args, PyObject *kwds)
static void UnaryFunction1DVec3f___dealloc__(BPy_UnaryFunction1DVec3f *self)
PyTypeObject UnaryFunction1D_Type
static struct PyModuleDef module