9 #include "../BPy_Convert.h"
10 #include "../BPy_IntegrationType.h"
11 #include "../BPy_Interface1D.h"
49 "Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DVec3f`\n"
51 "Base class for unary functions (functors) that work on\n"
52 ":class:`Interface1D` and return a 3D vector.\n"
54 ".. method:: __init__()\n"
55 " __init__(integration_type)\n"
57 " Builds a unary 1D function using the default constructor\n"
58 " or the integration method given as an argument.\n"
60 " :arg integration_type: An integration method.\n"
61 " :type integration_type: :class:`IntegrationType`\n";
67 static const char *kwlist[] = {
"integration",
nullptr};
68 PyObject *obj =
nullptr;
70 if (!PyArg_ParseTupleAndKeywords(
82 self->uf1D_vec3f->py_uf1D = (PyObject *)
self;
89 delete self->uf1D_vec3f;
95 return PyUnicode_FromFormat(
"type: %s - address: %p", Py_TYPE(
self)->tp_name,
self->uf1D_vec3f);
102 static const char *kwlist[] = {
"inter",
nullptr};
103 PyObject *obj =
nullptr;
105 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"O!", (
char **)kwlist, &
Interface1D_Type, &obj)) {
110 PyErr_SetString(PyExc_TypeError,
"__call__ method not properly overridden");
114 if (!PyErr_Occurred()) {
115 string class_name(Py_TYPE(
self)->tp_name);
116 PyErr_SetString(PyExc_RuntimeError, (class_name +
" __call__ method failed").c_str());
126 "The integration method.\n"
128 ":type: :class:`IntegrationType`");
140 PyErr_SetString(PyExc_TypeError,
"value must be an IntegrationType");
151 integration_type_doc,
153 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
159 PyVarObject_HEAD_INIT(
nullptr, 0)
"UnaryFunction1DVec3f",
177 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