37 BinaryPredicate0D___doc__,
38 "Base class for binary predicates working on :class:`Interface0D`\n"
39 "objects. A BinaryPredicate0D is typically an ordering relation\n"
40 "between two Interface0D objects. The predicate evaluates a relation\n"
41 "between the two Interface0D instances and returns a boolean value (true\n"
42 "or false). It is used by invoking the __call__() method.\n"
44 ".. method:: __init__()\n"
46 " Default constructor.\n"
48 ".. method:: __call__(inter1, inter2)\n"
50 " Must be overload by inherited classes. It evaluates a relation\n"
51 " between two Interface0D objects.\n"
53 " :arg inter1: The first Interface0D object.\n"
54 " :type inter1: :class:`Interface0D`\n"
55 " :arg inter2: The second Interface0D object.\n"
56 " :type inter2: :class:`Interface0D`\n"
57 " :return: True or false.\n"
61 static const char *kwlist[] = {
nullptr};
63 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"", (
char **)kwlist)) {
67 self->bp0D->py_bp0D = (PyObject *)
self;
75 Py_TYPE(
self)->tp_free((PyObject *)
self);
80 return PyUnicode_FromFormat(
"type: %s - address: %p", Py_TYPE(
self)->tp_name,
self->bp0D);
87 static const char *kwlist[] = {
"inter1",
"inter2",
nullptr};
90 if (!PyArg_ParseTupleAndKeywords(
96 PyErr_SetString(PyExc_TypeError,
"__call__ method not properly overridden");
99 if (
self->bp0D->operator()(*(obj1->
if0D), *(obj2->
if0D)) < 0) {
100 if (!PyErr_Occurred()) {
101 string class_name(Py_TYPE(
self)->tp_name);
102 PyErr_SetString(PyExc_RuntimeError, (class_name +
" __call__ method failed").c_str());
113 BinaryPredicate0D_name_doc,
114 "The name of the binary 0D predicate.\n"
119 return PyUnicode_FromString(Py_TYPE(
self)->tp_name);
126 BinaryPredicate0D_name_doc,
128 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
134 PyVarObject_HEAD_INIT(
nullptr, 0)
153 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
154 BinaryPredicate0D___doc__,
PyTypeObject BinaryPredicate0D_Type
static PyObject * BinaryPredicate0D___call__(BPy_BinaryPredicate0D *self, PyObject *args, PyObject *kwds)
static void BinaryPredicate0D___dealloc__(BPy_BinaryPredicate0D *self)
static PyObject * BinaryPredicate0D___repr__(BPy_BinaryPredicate0D *self)
static int BinaryPredicate0D___init__(BPy_BinaryPredicate0D *self, PyObject *args, PyObject *kwds)
static PyGetSetDef BPy_BinaryPredicate0D_getseters[]
PyDoc_STRVAR(BinaryPredicate0D___doc__, "Base class for binary predicates working on :class:`Interface0D`\n" "objects. A BinaryPredicate0D is typically an ordering relation\n" "between two Interface0D objects. The predicate evaluates a relation\n" "between the two Interface0D instances and returns a boolean value (true\n" "or false). It is used by invoking the __call__() method.\n" "\n" ".. method:: __init__()\n" "\n" " Default constructor.\n" "\n" ".. method:: __call__(inter1, inter2)\n" "\n" " Must be overload by inherited classes. It evaluates a relation\n" " between two Interface0D objects.\n" "\n" " :arg inter1: The first Interface0D object.\n" " :type inter1: :class:`Interface0D`\n" " :arg inter2: The second Interface0D object.\n" " :type inter2: :class:`Interface0D`\n" " :return: True or false.\n" " :rtype: bool\n")
static PyObject * BinaryPredicate0D_name_get(BPy_BinaryPredicate0D *self, void *)
int BinaryPredicate0D_Init(PyObject *module)
PyObject * PyBool_from_bool(bool b)
PyTypeObject Interface0D_Type
static struct PyModuleDef module
PyObject_HEAD Freestyle::Interface0D * if0D