27 if (module ==
nullptr) {
34 PyModule_AddObjectRef(
40 PyModule_AddObjectRef(
50 UnaryFunction1DUnsigned___doc__,
51 "Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DUnsigned`\n"
53 "Base class for unary functions (functors) that work on\n"
54 ":class:`Interface1D` and return an int value.\n"
56 ".. method:: __init__()\n"
57 " __init__(integration_type)\n"
59 " Builds a unary 1D function using the default constructor\n"
60 " or the integration method given as an argument.\n"
62 " :arg integration_type: An integration method.\n"
63 " :type integration_type: :class:`IntegrationType`\n");
69 static const char *kwlist[] = {
"integration",
nullptr};
70 PyObject *obj =
nullptr;
72 if (!PyArg_ParseTupleAndKeywords(
98 return PyUnicode_FromFormat(
99 "type: %s - address: %p", Py_TYPE(self)->tp_name, self->
uf1D_unsigned);
106 static const char *kwlist[] = {
"inter",
nullptr};
107 PyObject *obj =
nullptr;
109 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"O!", (
char **)kwlist, &
Interface1D_Type, &obj)) {
114 PyErr_SetString(PyExc_TypeError,
"__call__ method not properly overridden");
118 if (!PyErr_Occurred()) {
119 string class_name(Py_TYPE(self)->tp_name);
120 PyErr_SetString(PyExc_RuntimeError, (class_name +
" __call__ method failed").c_str());
131 integration_type_doc,
132 "The integration method.\n"
134 ":type: :class:`IntegrationType`");
146 PyErr_SetString(PyExc_TypeError,
"value must be an IntegrationType");
157 integration_type_doc,
159 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
165 PyVarObject_HEAD_INIT(
nullptr, 0)
166 "UnaryFunction1DUnsigned",
184 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
185 UnaryFunction1DUnsigned___doc__,
IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj)
PyObject * BPy_IntegrationType_from_IntegrationType(IntegrationType i)
PyDoc_STRVAR(FalseBP1D___doc__, "Class hierarchy: :class:`freestyle.types.BinaryPredicate1D` > :class:`FalseBP1D`\n" "\n" ".. method:: __call__(inter1, inter2)\n" "\n" " Always returns false.\n" "\n" " :arg inter1: The first Interface1D object.\n" " :type inter1: :class:`freestyle.types.Interface1D`\n" " :arg inter2: The second Interface1D object.\n" " :type inter2: :class:`freestyle.types.Interface1D`\n" " :return: False.\n" " :rtype: bool\n")
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 *)
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
IntegrationType getIntegrationType() const
void setIntegrationType(IntegrationType integration)
Freestyle::UnaryFunction1D< uint > * uf1D_unsigned