Made predicate and function types callable in the sense that
callable(I, T) returns True when I is an object of a type T or of a subtype of T. Also implemented a measure to avoid an infinite loop when user-defined predicate and function classes do not properly overload the __call__ method (including the cases of directly instantiating the base classes such as UnaryPredicate0D and BinaryPredicate1D).
This commit is contained in:
@@ -15,12 +15,11 @@ static void BinaryPredicate0D___dealloc__(BPy_BinaryPredicate0D *self);
|
||||
static PyObject * BinaryPredicate0D___repr__(BPy_BinaryPredicate0D *self);
|
||||
|
||||
static PyObject * BinaryPredicate0D_getName( BPy_BinaryPredicate0D *self, PyObject *args);
|
||||
static PyObject * BinaryPredicate0D___call__( BPy_BinaryPredicate0D *self, PyObject *args);
|
||||
static PyObject * BinaryPredicate0D___call__( BPy_BinaryPredicate0D *self, PyObject *args, PyObject *kwds);
|
||||
|
||||
/*----------------------BinaryPredicate0D instance definitions ----------------------------*/
|
||||
static PyMethodDef BPy_BinaryPredicate0D_methods[] = {
|
||||
{"getName", ( PyCFunction ) BinaryPredicate0D_getName, METH_NOARGS, "( )Returns the string of the name of the binary predicate."},
|
||||
{"__call__", ( PyCFunction ) BinaryPredicate0D___call__, METH_VARARGS, "BinaryPredicate0D(Interface0D, Interface0D ). Must be overloaded by inherited classes. It evaluates a relation between two Interface0D." },
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
@@ -50,7 +49,7 @@ PyTypeObject BinaryPredicate0D_Type = {
|
||||
/* More standard operations (here for binary compatibility) */
|
||||
|
||||
NULL, /* hashfunc tp_hash; */
|
||||
NULL, /* ternaryfunc tp_call; */
|
||||
(ternaryfunc)BinaryPredicate0D___call__, /* ternaryfunc tp_call; */
|
||||
NULL, /* reprfunc tp_str; */
|
||||
NULL, /* getattrofunc tp_getattro; */
|
||||
NULL, /* setattrofunc tp_setattro; */
|
||||
@@ -150,13 +149,21 @@ PyObject * BinaryPredicate0D_getName( BPy_BinaryPredicate0D *self, PyObject *arg
|
||||
return PyString_FromString( self->bp0D->getName().c_str() );
|
||||
}
|
||||
|
||||
PyObject * BinaryPredicate0D___call__( BPy_BinaryPredicate0D *self, PyObject *args)
|
||||
PyObject * BinaryPredicate0D___call__( BPy_BinaryPredicate0D *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
BPy_Interface0D *obj1, *obj2;
|
||||
|
||||
if( kwds != NULL ) {
|
||||
PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
|
||||
return NULL;
|
||||
}
|
||||
if( !PyArg_ParseTuple(args, "O!O!", &Interface0D_Type, &obj1, &Interface0D_Type, &obj2) )
|
||||
return NULL;
|
||||
|
||||
if( typeid(*(self->bp0D)) == typeid(BinaryPredicate0D) ) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
|
||||
return NULL;
|
||||
}
|
||||
if (self->bp0D->operator()( *(obj1->if0D) , *(obj2->if0D) ) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string msg(self->bp0D->getName() + " __call__ method failed");
|
||||
|
||||
@@ -21,12 +21,11 @@ static void BinaryPredicate1D___dealloc__(BPy_BinaryPredicate1D *self);
|
||||
static PyObject * BinaryPredicate1D___repr__(BPy_BinaryPredicate1D *self);
|
||||
|
||||
static PyObject * BinaryPredicate1D_getName( BPy_BinaryPredicate1D *self, PyObject *args);
|
||||
static PyObject * BinaryPredicate1D___call__( BPy_BinaryPredicate1D *self, PyObject *args);
|
||||
static PyObject * BinaryPredicate1D___call__( BPy_BinaryPredicate1D *self, PyObject *args, PyObject *kwds);
|
||||
|
||||
/*----------------------BinaryPredicate1D instance definitions ----------------------------*/
|
||||
static PyMethodDef BPy_BinaryPredicate1D_methods[] = {
|
||||
{"getName", ( PyCFunction ) BinaryPredicate1D_getName, METH_NOARGS, "( )Returns the string of the name of the binary predicate."},
|
||||
{"__call__", ( PyCFunction ) BinaryPredicate1D___call__, METH_VARARGS, "BinaryPredicate1D(Interface1D, Interface1D ). Must be overloaded by inherited classes. It evaluates a relation between two Interface1D." },
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
@@ -55,7 +54,7 @@ PyTypeObject BinaryPredicate1D_Type = {
|
||||
/* More standard operations (here for binary compatibility) */
|
||||
|
||||
NULL, /* hashfunc tp_hash; */
|
||||
NULL, /* ternaryfunc tp_call; */
|
||||
(ternaryfunc)BinaryPredicate1D___call__, /* ternaryfunc tp_call; */
|
||||
NULL, /* reprfunc tp_str; */
|
||||
NULL, /* getattrofunc tp_getattro; */
|
||||
NULL, /* setattrofunc tp_setattro; */
|
||||
@@ -179,13 +178,21 @@ PyObject *BinaryPredicate1D_getName( BPy_BinaryPredicate1D *self, PyObject *args
|
||||
return PyString_FromString( self->bp1D->getName().c_str() );
|
||||
}
|
||||
|
||||
PyObject *BinaryPredicate1D___call__( BPy_BinaryPredicate1D *self, PyObject *args)
|
||||
PyObject *BinaryPredicate1D___call__( BPy_BinaryPredicate1D *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
BPy_Interface1D *obj1, *obj2;
|
||||
|
||||
if( kwds != NULL ) {
|
||||
PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
|
||||
return NULL;
|
||||
}
|
||||
if( !PyArg_ParseTuple(args, "O!O!", &Interface1D_Type, &obj1, &Interface1D_Type, &obj2) )
|
||||
return NULL;
|
||||
|
||||
if( typeid(*(self->bp1D)) == typeid(BinaryPredicate1D) ) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
|
||||
return NULL;
|
||||
}
|
||||
if (self->bp1D->operator()( *(obj1->if1D) , *(obj2->if1D) ) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string msg(self->bp1D->getName() + " __call__ method failed");
|
||||
|
||||
@@ -17,12 +17,11 @@ static void UnaryPredicate0D___dealloc__(BPy_UnaryPredicate0D *self);
|
||||
static PyObject * UnaryPredicate0D___repr__(BPy_UnaryPredicate0D *self);
|
||||
|
||||
static PyObject * UnaryPredicate0D_getName( BPy_UnaryPredicate0D *self );
|
||||
static PyObject * UnaryPredicate0D___call__( BPy_UnaryPredicate0D *self, PyObject *args);
|
||||
static PyObject * UnaryPredicate0D___call__( BPy_UnaryPredicate0D *self, PyObject *args, PyObject *kwds);
|
||||
|
||||
/*----------------------UnaryPredicate0D instance definitions ----------------------------*/
|
||||
static PyMethodDef BPy_UnaryPredicate0D_methods[] = {
|
||||
{"getName", ( PyCFunction ) UnaryPredicate0D_getName, METH_NOARGS, "Returns the string of the name of the UnaryPredicate0D."},
|
||||
{"__call__", ( PyCFunction ) UnaryPredicate0D___call__, METH_VARARGS, "The () operator. Must be overload by inherited classes." },
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
@@ -52,7 +51,7 @@ PyTypeObject UnaryPredicate0D_Type = {
|
||||
/* More standard operations (here for binary compatibility) */
|
||||
|
||||
NULL, /* hashfunc tp_hash; */
|
||||
NULL, /* ternaryfunc tp_call; */
|
||||
(ternaryfunc)UnaryPredicate0D___call__, /* ternaryfunc tp_call; */
|
||||
NULL, /* reprfunc tp_str; */
|
||||
NULL, /* getattrofunc tp_getattro; */
|
||||
NULL, /* setattrofunc tp_setattro; */
|
||||
@@ -161,10 +160,14 @@ PyObject * UnaryPredicate0D_getName( BPy_UnaryPredicate0D *self )
|
||||
return PyString_FromString( self->up0D->getName().c_str() );
|
||||
}
|
||||
|
||||
PyObject * UnaryPredicate0D___call__( BPy_UnaryPredicate0D *self, PyObject *args)
|
||||
PyObject * UnaryPredicate0D___call__( BPy_UnaryPredicate0D *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyObject *py_if0D_it;
|
||||
|
||||
if( kwds != NULL ) {
|
||||
PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
|
||||
return NULL;
|
||||
}
|
||||
if( !PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &py_if0D_it) )
|
||||
return NULL;
|
||||
|
||||
@@ -175,6 +178,10 @@ PyObject * UnaryPredicate0D___call__( BPy_UnaryPredicate0D *self, PyObject *args
|
||||
PyErr_SetString(PyExc_RuntimeError, msg.c_str());
|
||||
return NULL;
|
||||
}
|
||||
if( typeid(*(self->up0D)) == typeid(UnaryPredicate0D) ) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
|
||||
return NULL;
|
||||
}
|
||||
if (self->up0D->operator()(*if0D_it) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string msg(self->up0D->getName() + " __call__ method failed");
|
||||
|
||||
@@ -25,12 +25,11 @@ static void UnaryPredicate1D___dealloc__(BPy_UnaryPredicate1D *self);
|
||||
static PyObject * UnaryPredicate1D___repr__(BPy_UnaryPredicate1D *self);
|
||||
|
||||
static PyObject * UnaryPredicate1D_getName( BPy_UnaryPredicate1D *self, PyObject *args);
|
||||
static PyObject * UnaryPredicate1D___call__( BPy_UnaryPredicate1D *self, PyObject *args);
|
||||
static PyObject * UnaryPredicate1D___call__( BPy_UnaryPredicate1D *self, PyObject *args, PyObject *kwds);
|
||||
|
||||
/*----------------------UnaryPredicate1D instance definitions ----------------------------*/
|
||||
static PyMethodDef BPy_UnaryPredicate1D_methods[] = {
|
||||
{"getName", ( PyCFunction ) UnaryPredicate1D_getName, METH_NOARGS, ""},
|
||||
{"__call__", ( PyCFunction ) UnaryPredicate1D___call__, METH_VARARGS, "" },
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
@@ -60,7 +59,7 @@ PyTypeObject UnaryPredicate1D_Type = {
|
||||
/* More standard operations (here for binary compatibility) */
|
||||
|
||||
NULL, /* hashfunc tp_hash; */
|
||||
NULL, /* ternaryfunc tp_call; */
|
||||
(ternaryfunc)UnaryPredicate1D___call__, /* ternaryfunc tp_call; */
|
||||
NULL, /* reprfunc tp_str; */
|
||||
NULL, /* getattrofunc tp_getattro; */
|
||||
NULL, /* setattrofunc tp_setattro; */
|
||||
@@ -203,10 +202,14 @@ PyObject * UnaryPredicate1D_getName( BPy_UnaryPredicate1D *self, PyObject *args)
|
||||
return PyString_FromString( self->up1D->getName().c_str() );
|
||||
}
|
||||
|
||||
PyObject * UnaryPredicate1D___call__( BPy_UnaryPredicate1D *self, PyObject *args)
|
||||
static PyObject * UnaryPredicate1D___call__( BPy_UnaryPredicate1D *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyObject *py_if1D;
|
||||
|
||||
if( kwds != NULL ) {
|
||||
PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
|
||||
return NULL;
|
||||
}
|
||||
if( !PyArg_ParseTuple(args, "O!", &Interface1D_Type, &py_if1D) )
|
||||
return NULL;
|
||||
|
||||
@@ -217,6 +220,10 @@ PyObject * UnaryPredicate1D___call__( BPy_UnaryPredicate1D *self, PyObject *args
|
||||
PyErr_SetString(PyExc_RuntimeError, msg.c_str());
|
||||
return NULL;
|
||||
}
|
||||
if( typeid(*(self->up1D)) == typeid(UnaryPredicate1D) ) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
|
||||
return NULL;
|
||||
}
|
||||
if( self->up1D->operator()(*if1D) < 0 ) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string msg(self->up1D->getName() + " __call__ method failed");
|
||||
|
||||
@@ -28,12 +28,11 @@ static void UnaryFunction0DDouble___dealloc__(BPy_UnaryFunction0DDouble* self);
|
||||
static PyObject * UnaryFunction0DDouble___repr__(BPy_UnaryFunction0DDouble* self);
|
||||
|
||||
static PyObject * UnaryFunction0DDouble_getName( BPy_UnaryFunction0DDouble *self);
|
||||
static PyObject * UnaryFunction0DDouble___call__( BPy_UnaryFunction0DDouble *self, PyObject *args);
|
||||
static PyObject * UnaryFunction0DDouble___call__( BPy_UnaryFunction0DDouble *self, PyObject *args, PyObject *kwds);
|
||||
|
||||
/*----------------------UnaryFunction0DDouble instance definitions ----------------------------*/
|
||||
static PyMethodDef BPy_UnaryFunction0DDouble_methods[] = {
|
||||
{"getName", ( PyCFunction ) UnaryFunction0DDouble_getName, METH_NOARGS, "( )Returns the string of the name of the unary 0D function."},
|
||||
{"__call__", ( PyCFunction ) UnaryFunction0DDouble___call__, METH_VARARGS, "(Interface0DIterator it )Executes the operator () on the iterator it pointing onto the point at which we wish to evaluate the function." },
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
@@ -63,7 +62,7 @@ PyTypeObject UnaryFunction0DDouble_Type = {
|
||||
/* More standard operations (here for binary compatibility) */
|
||||
|
||||
NULL, /* hashfunc tp_hash; */
|
||||
NULL, /* ternaryfunc tp_call; */
|
||||
(ternaryfunc)UnaryFunction0DDouble___call__, /* ternaryfunc tp_call; */
|
||||
NULL, /* reprfunc tp_str; */
|
||||
NULL, /* getattrofunc tp_getattro; */
|
||||
NULL, /* setattrofunc tp_setattro; */
|
||||
@@ -213,13 +212,21 @@ PyObject * UnaryFunction0DDouble_getName( BPy_UnaryFunction0DDouble *self )
|
||||
return PyString_FromString( self->uf0D_double->getName().c_str() );
|
||||
}
|
||||
|
||||
PyObject * UnaryFunction0DDouble___call__( BPy_UnaryFunction0DDouble *self, PyObject *args)
|
||||
PyObject * UnaryFunction0DDouble___call__( BPy_UnaryFunction0DDouble *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyObject *obj;
|
||||
|
||||
if( kwds != NULL ) {
|
||||
PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
|
||||
return NULL;
|
||||
}
|
||||
if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj))
|
||||
return NULL;
|
||||
|
||||
if( typeid(*(self->uf0D_double)) == typeid(UnaryFunction0D<double>) ) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf0D_double->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it)) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string msg(self->uf0D_double->getName() + " __call__ method failed");
|
||||
|
||||
@@ -17,12 +17,11 @@ static void UnaryFunction0DEdgeNature___dealloc__(BPy_UnaryFunction0DEdgeNature*
|
||||
static PyObject * UnaryFunction0DEdgeNature___repr__(BPy_UnaryFunction0DEdgeNature* self);
|
||||
|
||||
static PyObject * UnaryFunction0DEdgeNature_getName( BPy_UnaryFunction0DEdgeNature *self);
|
||||
static PyObject * UnaryFunction0DEdgeNature___call__( BPy_UnaryFunction0DEdgeNature *self, PyObject *args);
|
||||
static PyObject * UnaryFunction0DEdgeNature___call__( BPy_UnaryFunction0DEdgeNature *self, PyObject *args, PyObject *kwds);
|
||||
|
||||
/*----------------------UnaryFunction0DEdgeNature instance definitions ----------------------------*/
|
||||
static PyMethodDef BPy_UnaryFunction0DEdgeNature_methods[] = {
|
||||
{"getName", ( PyCFunction ) UnaryFunction0DEdgeNature_getName, METH_NOARGS, "( )Returns the string of the name of the unary 0D function."},
|
||||
{"__call__", ( PyCFunction ) UnaryFunction0DEdgeNature___call__, METH_VARARGS, "(Interface0DIterator it )Executes the operator () on the iterator it pointing onto the point at which we wish to evaluate the function." },
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
@@ -52,7 +51,7 @@ PyTypeObject UnaryFunction0DEdgeNature_Type = {
|
||||
/* More standard operations (here for binary compatibility) */
|
||||
|
||||
NULL, /* hashfunc tp_hash; */
|
||||
NULL, /* ternaryfunc tp_call; */
|
||||
(ternaryfunc)UnaryFunction0DEdgeNature___call__, /* ternaryfunc tp_call; */
|
||||
NULL, /* reprfunc tp_str; */
|
||||
NULL, /* getattrofunc tp_getattro; */
|
||||
NULL, /* setattrofunc tp_setattro; */
|
||||
@@ -156,13 +155,21 @@ PyObject * UnaryFunction0DEdgeNature_getName( BPy_UnaryFunction0DEdgeNature *sel
|
||||
return PyString_FromString( self->uf0D_edgenature->getName().c_str() );
|
||||
}
|
||||
|
||||
PyObject * UnaryFunction0DEdgeNature___call__( BPy_UnaryFunction0DEdgeNature *self, PyObject *args)
|
||||
PyObject * UnaryFunction0DEdgeNature___call__( BPy_UnaryFunction0DEdgeNature *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyObject *obj;
|
||||
|
||||
if( kwds != NULL ) {
|
||||
PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
|
||||
return NULL;
|
||||
}
|
||||
if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj))
|
||||
return NULL;
|
||||
|
||||
if( typeid(*(self->uf0D_edgenature)) == typeid(UnaryFunction0D<Nature::EdgeNature>) ) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf0D_edgenature->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string msg(self->uf0D_edgenature->getName() + " __call__ method failed");
|
||||
|
||||
@@ -22,12 +22,11 @@ static void UnaryFunction0DFloat___dealloc__(BPy_UnaryFunction0DFloat* self);
|
||||
static PyObject * UnaryFunction0DFloat___repr__(BPy_UnaryFunction0DFloat* self);
|
||||
|
||||
static PyObject * UnaryFunction0DFloat_getName( BPy_UnaryFunction0DFloat *self);
|
||||
static PyObject * UnaryFunction0DFloat___call__( BPy_UnaryFunction0DFloat *self, PyObject *args);
|
||||
static PyObject * UnaryFunction0DFloat___call__( BPy_UnaryFunction0DFloat *self, PyObject *args, PyObject *kwds);
|
||||
|
||||
/*----------------------UnaryFunction0DFloat instance definitions ----------------------------*/
|
||||
static PyMethodDef BPy_UnaryFunction0DFloat_methods[] = {
|
||||
{"getName", ( PyCFunction ) UnaryFunction0DFloat_getName, METH_NOARGS, "( )Returns the string of the name of the unary 0D function."},
|
||||
{"__call__", ( PyCFunction ) UnaryFunction0DFloat___call__, METH_VARARGS, "(Interface0DIterator it )Executes the operator () on the iterator it pointing onto the point at which we wish to evaluate the function." },
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
@@ -57,7 +56,7 @@ PyTypeObject UnaryFunction0DFloat_Type = {
|
||||
/* More standard operations (here for binary compatibility) */
|
||||
|
||||
NULL, /* hashfunc tp_hash; */
|
||||
NULL, /* ternaryfunc tp_call; */
|
||||
(ternaryfunc)UnaryFunction0DFloat___call__, /* ternaryfunc tp_call; */
|
||||
NULL, /* reprfunc tp_str; */
|
||||
NULL, /* getattrofunc tp_getattro; */
|
||||
NULL, /* setattrofunc tp_setattro; */
|
||||
@@ -185,13 +184,21 @@ PyObject * UnaryFunction0DFloat_getName( BPy_UnaryFunction0DFloat *self )
|
||||
return PyString_FromString( self->uf0D_float->getName().c_str() );
|
||||
}
|
||||
|
||||
PyObject * UnaryFunction0DFloat___call__( BPy_UnaryFunction0DFloat *self, PyObject *args)
|
||||
PyObject * UnaryFunction0DFloat___call__( BPy_UnaryFunction0DFloat *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyObject *obj;
|
||||
|
||||
if( kwds != NULL ) {
|
||||
PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
|
||||
return NULL;
|
||||
}
|
||||
if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj))
|
||||
return NULL;
|
||||
|
||||
if( typeid(*(self->uf0D_float)) == typeid(UnaryFunction0D<float>) ) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf0D_float->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string msg(self->uf0D_float->getName() + " __call__ method failed");
|
||||
|
||||
@@ -17,12 +17,11 @@ static void UnaryFunction0DId___dealloc__(BPy_UnaryFunction0DId* self);
|
||||
static PyObject * UnaryFunction0DId___repr__(BPy_UnaryFunction0DId* self);
|
||||
|
||||
static PyObject * UnaryFunction0DId_getName( BPy_UnaryFunction0DId *self);
|
||||
static PyObject * UnaryFunction0DId___call__( BPy_UnaryFunction0DId *self, PyObject *args);
|
||||
static PyObject * UnaryFunction0DId___call__( BPy_UnaryFunction0DId *self, PyObject *args, PyObject *kwds);
|
||||
|
||||
/*----------------------UnaryFunction0DId instance definitions ----------------------------*/
|
||||
static PyMethodDef BPy_UnaryFunction0DId_methods[] = {
|
||||
{"getName", ( PyCFunction ) UnaryFunction0DId_getName, METH_NOARGS, "( )Returns the string of the name of the unary 0D function."},
|
||||
{"__call__", ( PyCFunction ) UnaryFunction0DId___call__, METH_VARARGS, "(Interface0DIterator it )Executes the operator () on the iterator it pointing onto the point at which we wish to evaluate the function." },
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
@@ -52,7 +51,7 @@ PyTypeObject UnaryFunction0DId_Type = {
|
||||
/* More standard operations (here for binary compatibility) */
|
||||
|
||||
NULL, /* hashfunc tp_hash; */
|
||||
NULL, /* ternaryfunc tp_call; */
|
||||
(ternaryfunc)UnaryFunction0DId___call__, /* ternaryfunc tp_call; */
|
||||
NULL, /* reprfunc tp_str; */
|
||||
NULL, /* getattrofunc tp_getattro; */
|
||||
NULL, /* setattrofunc tp_setattro; */
|
||||
@@ -156,13 +155,21 @@ PyObject * UnaryFunction0DId_getName( BPy_UnaryFunction0DId *self )
|
||||
return PyString_FromString( self->uf0D_id->getName().c_str() );
|
||||
}
|
||||
|
||||
PyObject * UnaryFunction0DId___call__( BPy_UnaryFunction0DId *self, PyObject *args)
|
||||
PyObject * UnaryFunction0DId___call__( BPy_UnaryFunction0DId *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyObject *obj;
|
||||
|
||||
if( kwds != NULL ) {
|
||||
PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
|
||||
return NULL;
|
||||
}
|
||||
if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj))
|
||||
return NULL;
|
||||
|
||||
if( typeid(*(self->uf0D_id)) == typeid(UnaryFunction0D<Id>) ) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf0D_id->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string msg(self->uf0D_id->getName() + " __call__ method failed");
|
||||
|
||||
@@ -17,12 +17,11 @@ static void UnaryFunction0DMaterial___dealloc__(BPy_UnaryFunction0DMaterial* sel
|
||||
static PyObject * UnaryFunction0DMaterial___repr__(BPy_UnaryFunction0DMaterial* self);
|
||||
|
||||
static PyObject * UnaryFunction0DMaterial_getName( BPy_UnaryFunction0DMaterial *self);
|
||||
static PyObject * UnaryFunction0DMaterial___call__( BPy_UnaryFunction0DMaterial *self, PyObject *args);
|
||||
static PyObject * UnaryFunction0DMaterial___call__( BPy_UnaryFunction0DMaterial *self, PyObject *args, PyObject *kwds);
|
||||
|
||||
/*----------------------UnaryFunction0DMaterial instance definitions ----------------------------*/
|
||||
static PyMethodDef BPy_UnaryFunction0DMaterial_methods[] = {
|
||||
{"getName", ( PyCFunction ) UnaryFunction0DMaterial_getName, METH_NOARGS, "( )Returns the string of the name of the unary 0D function."},
|
||||
{"__call__", ( PyCFunction ) UnaryFunction0DMaterial___call__, METH_VARARGS, "(Interface0DIterator it )Executes the operator () on the iterator it pointing onto the point at which we wish to evaluate the function." },
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
@@ -52,7 +51,7 @@ PyTypeObject UnaryFunction0DMaterial_Type = {
|
||||
/* More standard operations (here for binary compatibility) */
|
||||
|
||||
NULL, /* hashfunc tp_hash; */
|
||||
NULL, /* ternaryfunc tp_call; */
|
||||
(ternaryfunc)UnaryFunction0DMaterial___call__, /* ternaryfunc tp_call; */
|
||||
NULL, /* reprfunc tp_str; */
|
||||
NULL, /* getattrofunc tp_getattro; */
|
||||
NULL, /* setattrofunc tp_setattro; */
|
||||
@@ -156,13 +155,21 @@ PyObject * UnaryFunction0DMaterial_getName( BPy_UnaryFunction0DMaterial *self )
|
||||
return PyString_FromString( self->uf0D_material->getName().c_str() );
|
||||
}
|
||||
|
||||
PyObject * UnaryFunction0DMaterial___call__( BPy_UnaryFunction0DMaterial *self, PyObject *args)
|
||||
PyObject * UnaryFunction0DMaterial___call__( BPy_UnaryFunction0DMaterial *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyObject *obj;
|
||||
|
||||
if( kwds != NULL ) {
|
||||
PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
|
||||
return NULL;
|
||||
}
|
||||
if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj))
|
||||
return NULL;
|
||||
|
||||
if( typeid(*(self->uf0D_material)) == typeid(UnaryFunction0D<FrsMaterial>) ) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf0D_material->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string msg(self->uf0D_material->getName() + " __call__ method failed");
|
||||
|
||||
@@ -17,12 +17,11 @@ static void UnaryFunction0DUnsigned___dealloc__(BPy_UnaryFunction0DUnsigned* sel
|
||||
static PyObject * UnaryFunction0DUnsigned___repr__(BPy_UnaryFunction0DUnsigned* self);
|
||||
|
||||
static PyObject * UnaryFunction0DUnsigned_getName( BPy_UnaryFunction0DUnsigned *self);
|
||||
static PyObject * UnaryFunction0DUnsigned___call__( BPy_UnaryFunction0DUnsigned *self, PyObject *args);
|
||||
static PyObject * UnaryFunction0DUnsigned___call__( BPy_UnaryFunction0DUnsigned *self, PyObject *args, PyObject *kwds);
|
||||
|
||||
/*----------------------UnaryFunction0DUnsigned instance definitions ----------------------------*/
|
||||
static PyMethodDef BPy_UnaryFunction0DUnsigned_methods[] = {
|
||||
{"getName", ( PyCFunction ) UnaryFunction0DUnsigned_getName, METH_NOARGS, "( )Returns the string of the name of the unary 0D function."},
|
||||
{"__call__", ( PyCFunction ) UnaryFunction0DUnsigned___call__, METH_VARARGS, "(Interface0DIterator it )Executes the operator () on the iterator it pointing onto the point at which we wish to evaluate the function." },
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
@@ -52,7 +51,7 @@ PyTypeObject UnaryFunction0DUnsigned_Type = {
|
||||
/* More standard operations (here for binary compatibility) */
|
||||
|
||||
NULL, /* hashfunc tp_hash; */
|
||||
NULL, /* ternaryfunc tp_call; */
|
||||
(ternaryfunc)UnaryFunction0DUnsigned___call__, /* ternaryfunc tp_call; */
|
||||
NULL, /* reprfunc tp_str; */
|
||||
NULL, /* getattrofunc tp_getattro; */
|
||||
NULL, /* setattrofunc tp_setattro; */
|
||||
@@ -156,13 +155,21 @@ PyObject * UnaryFunction0DUnsigned_getName( BPy_UnaryFunction0DUnsigned *self )
|
||||
return PyString_FromString( self->uf0D_unsigned->getName().c_str() );
|
||||
}
|
||||
|
||||
PyObject * UnaryFunction0DUnsigned___call__( BPy_UnaryFunction0DUnsigned *self, PyObject *args)
|
||||
PyObject * UnaryFunction0DUnsigned___call__( BPy_UnaryFunction0DUnsigned *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyObject *obj;
|
||||
|
||||
if( kwds != NULL ) {
|
||||
PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
|
||||
return NULL;
|
||||
}
|
||||
if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj))
|
||||
return NULL;
|
||||
|
||||
if( typeid(*(self->uf0D_unsigned)) == typeid(UnaryFunction0D<unsigned int>) ) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf0D_unsigned->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string msg(self->uf0D_unsigned->getName() + " __call__ method failed");
|
||||
|
||||
@@ -18,12 +18,11 @@ static void UnaryFunction0DVec2f___dealloc__(BPy_UnaryFunction0DVec2f* self);
|
||||
static PyObject * UnaryFunction0DVec2f___repr__(BPy_UnaryFunction0DVec2f* self);
|
||||
|
||||
static PyObject * UnaryFunction0DVec2f_getName( BPy_UnaryFunction0DVec2f *self);
|
||||
static PyObject * UnaryFunction0DVec2f___call__( BPy_UnaryFunction0DVec2f *self, PyObject *args);
|
||||
static PyObject * UnaryFunction0DVec2f___call__( BPy_UnaryFunction0DVec2f *self, PyObject *args, PyObject *kwds);
|
||||
|
||||
/*----------------------UnaryFunction0DVec2f instance definitions ----------------------------*/
|
||||
static PyMethodDef BPy_UnaryFunction0DVec2f_methods[] = {
|
||||
{"getName", ( PyCFunction ) UnaryFunction0DVec2f_getName, METH_NOARGS, "( )Returns the string of the name of the unary 0D function."},
|
||||
{"__call__", ( PyCFunction ) UnaryFunction0DVec2f___call__, METH_VARARGS, "(Interface0DIterator it )Executes the operator () on the iterator it pointing onto the point at which we wish to evaluate the function." },
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
@@ -53,7 +52,7 @@ PyTypeObject UnaryFunction0DVec2f_Type = {
|
||||
/* More standard operations (here for binary compatibility) */
|
||||
|
||||
NULL, /* hashfunc tp_hash; */
|
||||
NULL, /* ternaryfunc tp_call; */
|
||||
(ternaryfunc)UnaryFunction0DVec2f___call__, /* ternaryfunc tp_call; */
|
||||
NULL, /* reprfunc tp_str; */
|
||||
NULL, /* getattrofunc tp_getattro; */
|
||||
NULL, /* setattrofunc tp_setattro; */
|
||||
@@ -162,12 +161,21 @@ PyObject * UnaryFunction0DVec2f_getName( BPy_UnaryFunction0DVec2f *self )
|
||||
return PyString_FromString( self->uf0D_vec2f->getName().c_str() );
|
||||
}
|
||||
|
||||
PyObject * UnaryFunction0DVec2f___call__( BPy_UnaryFunction0DVec2f *self, PyObject *args)
|
||||
PyObject * UnaryFunction0DVec2f___call__( BPy_UnaryFunction0DVec2f *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyObject *obj;
|
||||
|
||||
if( kwds != NULL ) {
|
||||
PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
|
||||
return NULL;
|
||||
}
|
||||
if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj))
|
||||
return NULL;
|
||||
|
||||
if( typeid(*(self->uf0D_vec2f)) == typeid(UnaryFunction0D<Vec2f>) ) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf0D_vec2f->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string msg(self->uf0D_vec2f->getName() + " __call__ method failed");
|
||||
|
||||
@@ -17,12 +17,11 @@ static void UnaryFunction0DVec3f___dealloc__(BPy_UnaryFunction0DVec3f* self);
|
||||
static PyObject * UnaryFunction0DVec3f___repr__(BPy_UnaryFunction0DVec3f* self);
|
||||
|
||||
static PyObject * UnaryFunction0DVec3f_getName( BPy_UnaryFunction0DVec3f *self);
|
||||
static PyObject * UnaryFunction0DVec3f___call__( BPy_UnaryFunction0DVec3f *self, PyObject *args);
|
||||
static PyObject * UnaryFunction0DVec3f___call__( BPy_UnaryFunction0DVec3f *self, PyObject *args, PyObject *kwds);
|
||||
|
||||
/*----------------------UnaryFunction0DVec3f instance definitions ----------------------------*/
|
||||
static PyMethodDef BPy_UnaryFunction0DVec3f_methods[] = {
|
||||
{"getName", ( PyCFunction ) UnaryFunction0DVec3f_getName, METH_NOARGS, "( )Returns the string of the name of the unary 0D function."},
|
||||
{"__call__", ( PyCFunction ) UnaryFunction0DVec3f___call__, METH_VARARGS, "(Interface0DIterator it )Executes the operator () on the iterator it pointing onto the point at which we wish to evaluate the function." },
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
@@ -52,7 +51,7 @@ PyTypeObject UnaryFunction0DVec3f_Type = {
|
||||
/* More standard operations (here for binary compatibility) */
|
||||
|
||||
NULL, /* hashfunc tp_hash; */
|
||||
NULL, /* ternaryfunc tp_call; */
|
||||
(ternaryfunc)UnaryFunction0DVec3f___call__, /* ternaryfunc tp_call; */
|
||||
NULL, /* reprfunc tp_str; */
|
||||
NULL, /* getattrofunc tp_getattro; */
|
||||
NULL, /* setattrofunc tp_setattro; */
|
||||
@@ -156,13 +155,21 @@ PyObject * UnaryFunction0DVec3f_getName( BPy_UnaryFunction0DVec3f *self )
|
||||
return PyString_FromString( self->uf0D_vec3f->getName().c_str() );
|
||||
}
|
||||
|
||||
PyObject * UnaryFunction0DVec3f___call__( BPy_UnaryFunction0DVec3f *self, PyObject *args)
|
||||
PyObject * UnaryFunction0DVec3f___call__( BPy_UnaryFunction0DVec3f *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyObject *obj;
|
||||
|
||||
if( kwds != NULL ) {
|
||||
PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
|
||||
return NULL;
|
||||
}
|
||||
if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj))
|
||||
return NULL;
|
||||
|
||||
if( typeid(*(self->uf0D_vec3f)) == typeid(UnaryFunction0D<Vec3f>) ) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf0D_vec3f->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string msg(self->uf0D_vec3f->getName() + " __call__ method failed");
|
||||
|
||||
@@ -17,12 +17,11 @@ static void UnaryFunction0DVectorViewShape___dealloc__(BPy_UnaryFunction0DVector
|
||||
static PyObject * UnaryFunction0DVectorViewShape___repr__(BPy_UnaryFunction0DVectorViewShape* self);
|
||||
|
||||
static PyObject * UnaryFunction0DVectorViewShape_getName( BPy_UnaryFunction0DVectorViewShape *self);
|
||||
static PyObject * UnaryFunction0DVectorViewShape___call__( BPy_UnaryFunction0DVectorViewShape *self, PyObject *args);
|
||||
static PyObject * UnaryFunction0DVectorViewShape___call__( BPy_UnaryFunction0DVectorViewShape *self, PyObject *args, PyObject *kwds);
|
||||
|
||||
/*----------------------UnaryFunction0DVectorViewShape instance definitions ----------------------------*/
|
||||
static PyMethodDef BPy_UnaryFunction0DVectorViewShape_methods[] = {
|
||||
{"getName", ( PyCFunction ) UnaryFunction0DVectorViewShape_getName, METH_NOARGS, "( )Returns the string of the name of the unary 0D function."},
|
||||
{"__call__", ( PyCFunction ) UnaryFunction0DVectorViewShape___call__, METH_VARARGS, "(Interface0DIterator it )Executes the operator () on the iterator it pointing onto the point at which we wish to evaluate the function." },
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
@@ -52,7 +51,7 @@ PyTypeObject UnaryFunction0DVectorViewShape_Type = {
|
||||
/* More standard operations (here for binary compatibility) */
|
||||
|
||||
NULL, /* hashfunc tp_hash; */
|
||||
NULL, /* ternaryfunc tp_call; */
|
||||
(ternaryfunc)UnaryFunction0DVectorViewShape___call__, /* ternaryfunc tp_call; */
|
||||
NULL, /* reprfunc tp_str; */
|
||||
NULL, /* getattrofunc tp_getattro; */
|
||||
NULL, /* setattrofunc tp_setattro; */
|
||||
@@ -156,13 +155,21 @@ PyObject * UnaryFunction0DVectorViewShape_getName( BPy_UnaryFunction0DVectorView
|
||||
return PyString_FromString( self->uf0D_vectorviewshape->getName().c_str() );
|
||||
}
|
||||
|
||||
PyObject * UnaryFunction0DVectorViewShape___call__( BPy_UnaryFunction0DVectorViewShape *self, PyObject *args)
|
||||
PyObject * UnaryFunction0DVectorViewShape___call__( BPy_UnaryFunction0DVectorViewShape *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyObject *obj;
|
||||
|
||||
if( kwds != NULL ) {
|
||||
PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
|
||||
return NULL;
|
||||
}
|
||||
if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj))
|
||||
return NULL;
|
||||
|
||||
if( typeid(*(self->uf0D_vectorviewshape)) == typeid(UnaryFunction0D<std::vector<ViewShape*>>) ) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf0D_vectorviewshape->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string msg(self->uf0D_vectorviewshape->getName() + " __call__ method failed");
|
||||
|
||||
@@ -18,12 +18,11 @@ static void UnaryFunction0DViewShape___dealloc__(BPy_UnaryFunction0DViewShape* s
|
||||
static PyObject * UnaryFunction0DViewShape___repr__(BPy_UnaryFunction0DViewShape* self);
|
||||
|
||||
static PyObject * UnaryFunction0DViewShape_getName( BPy_UnaryFunction0DViewShape *self);
|
||||
static PyObject * UnaryFunction0DViewShape___call__( BPy_UnaryFunction0DViewShape *self, PyObject *args);
|
||||
static PyObject * UnaryFunction0DViewShape___call__( BPy_UnaryFunction0DViewShape *self, PyObject *args, PyObject *kwds);
|
||||
|
||||
/*----------------------UnaryFunction0DViewShape instance definitions ----------------------------*/
|
||||
static PyMethodDef BPy_UnaryFunction0DViewShape_methods[] = {
|
||||
{"getName", ( PyCFunction ) UnaryFunction0DViewShape_getName, METH_NOARGS, "( )Returns the string of the name of the unary 0D function."},
|
||||
{"__call__", ( PyCFunction ) UnaryFunction0DViewShape___call__, METH_VARARGS, "(Interface0DIterator it )Executes the operator () on the iterator it pointing onto the point at which we wish to evaluate the function." },
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
@@ -53,7 +52,7 @@ PyTypeObject UnaryFunction0DViewShape_Type = {
|
||||
/* More standard operations (here for binary compatibility) */
|
||||
|
||||
NULL, /* hashfunc tp_hash; */
|
||||
NULL, /* ternaryfunc tp_call; */
|
||||
(ternaryfunc)UnaryFunction0DViewShape___call__, /* ternaryfunc tp_call; */
|
||||
NULL, /* reprfunc tp_str; */
|
||||
NULL, /* getattrofunc tp_getattro; */
|
||||
NULL, /* setattrofunc tp_setattro; */
|
||||
@@ -162,13 +161,21 @@ PyObject * UnaryFunction0DViewShape_getName( BPy_UnaryFunction0DViewShape *self
|
||||
return PyString_FromString( self->uf0D_viewshape->getName().c_str() );
|
||||
}
|
||||
|
||||
PyObject * UnaryFunction0DViewShape___call__( BPy_UnaryFunction0DViewShape *self, PyObject *args)
|
||||
PyObject * UnaryFunction0DViewShape___call__( BPy_UnaryFunction0DViewShape *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyObject *obj;
|
||||
|
||||
if( kwds != NULL ) {
|
||||
PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
|
||||
return NULL;
|
||||
}
|
||||
if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj))
|
||||
return NULL;
|
||||
|
||||
if( typeid(*(self->uf0D_viewshape)) == typeid(UnaryFunction0D<ViewShape*>) ) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf0D_viewshape->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string msg(self->uf0D_viewshape->getName() + " __call__ method failed");
|
||||
|
||||
@@ -32,14 +32,13 @@ static void UnaryFunction1DDouble___dealloc__(BPy_UnaryFunction1DDouble* self);
|
||||
static PyObject * UnaryFunction1DDouble___repr__(BPy_UnaryFunction1DDouble* self);
|
||||
|
||||
static PyObject * UnaryFunction1DDouble_getName( BPy_UnaryFunction1DDouble *self);
|
||||
static PyObject * UnaryFunction1DDouble___call__( BPy_UnaryFunction1DDouble *self, PyObject *args);
|
||||
static PyObject * UnaryFunction1DDouble___call__( BPy_UnaryFunction1DDouble *self, PyObject *args, PyObject *kwds);
|
||||
static PyObject * UnaryFunction1DDouble_setIntegrationType(BPy_UnaryFunction1DDouble* self, PyObject *args);
|
||||
static PyObject * UnaryFunction1DDouble_getIntegrationType(BPy_UnaryFunction1DDouble* self);
|
||||
|
||||
/*----------------------UnaryFunction1DDouble instance definitions ----------------------------*/
|
||||
static PyMethodDef BPy_UnaryFunction1DDouble_methods[] = {
|
||||
{"getName", ( PyCFunction ) UnaryFunction1DDouble_getName, METH_NOARGS, "( )Returns the string of the name of the unary 1D function."},
|
||||
{"__call__", ( PyCFunction ) UnaryFunction1DDouble___call__, METH_VARARGS, "(Interface1D if1D )Builds a UnaryFunction1D from an integration type. " },
|
||||
{"setIntegrationType", ( PyCFunction ) UnaryFunction1DDouble_setIntegrationType, METH_VARARGS, "(IntegrationType i )Sets the integration method" },
|
||||
{"getIntegrationType", ( PyCFunction ) UnaryFunction1DDouble_getIntegrationType, METH_NOARGS, "() Returns the integration method." },
|
||||
{NULL, NULL, 0, NULL}
|
||||
@@ -71,7 +70,7 @@ PyTypeObject UnaryFunction1DDouble_Type = {
|
||||
/* More standard operations (here for binary compatibility) */
|
||||
|
||||
NULL, /* hashfunc tp_hash; */
|
||||
NULL, /* ternaryfunc tp_call; */
|
||||
(ternaryfunc)UnaryFunction1DDouble___call__, /* ternaryfunc tp_call; */
|
||||
NULL, /* reprfunc tp_str; */
|
||||
NULL, /* getattrofunc tp_getattro; */
|
||||
NULL, /* setattrofunc tp_setattro; */
|
||||
@@ -253,13 +252,21 @@ PyObject * UnaryFunction1DDouble_getName( BPy_UnaryFunction1DDouble *self )
|
||||
return PyString_FromString( self->uf1D_double->getName().c_str() );
|
||||
}
|
||||
|
||||
PyObject * UnaryFunction1DDouble___call__( BPy_UnaryFunction1DDouble *self, PyObject *args)
|
||||
PyObject * UnaryFunction1DDouble___call__( BPy_UnaryFunction1DDouble *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyObject *obj;
|
||||
|
||||
if( kwds != NULL ) {
|
||||
PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
|
||||
return NULL;
|
||||
}
|
||||
if( !PyArg_ParseTuple(args, "O!", &Interface1D_Type, &obj) )
|
||||
return NULL;
|
||||
|
||||
if( typeid(*(self->uf1D_double)) == typeid(UnaryFunction1D<double>) ) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_double->operator()(*( ((BPy_Interface1D *) obj)->if1D )) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string msg(self->uf1D_double->getName() + " __call__ method failed");
|
||||
|
||||
@@ -18,14 +18,13 @@ static void UnaryFunction1DEdgeNature___dealloc__(BPy_UnaryFunction1DEdgeNature*
|
||||
static PyObject * UnaryFunction1DEdgeNature___repr__(BPy_UnaryFunction1DEdgeNature* self);
|
||||
|
||||
static PyObject * UnaryFunction1DEdgeNature_getName( BPy_UnaryFunction1DEdgeNature *self);
|
||||
static PyObject * UnaryFunction1DEdgeNature___call__( BPy_UnaryFunction1DEdgeNature *self, PyObject *args);
|
||||
static PyObject * UnaryFunction1DEdgeNature___call__( BPy_UnaryFunction1DEdgeNature *self, PyObject *args, PyObject *kwds);
|
||||
static PyObject * UnaryFunction1DEdgeNature_setIntegrationType(BPy_UnaryFunction1DEdgeNature* self, PyObject *args);
|
||||
static PyObject * UnaryFunction1DEdgeNature_getIntegrationType(BPy_UnaryFunction1DEdgeNature* self);
|
||||
|
||||
/*----------------------UnaryFunction1DEdgeNature instance definitions ----------------------------*/
|
||||
static PyMethodDef BPy_UnaryFunction1DEdgeNature_methods[] = {
|
||||
{"getName", ( PyCFunction ) UnaryFunction1DEdgeNature_getName, METH_NOARGS, "( )Returns the string of the name of the unary 1D function."},
|
||||
{"__call__", ( PyCFunction ) UnaryFunction1DEdgeNature___call__, METH_VARARGS, "(Interface1D if1D )Builds a UnaryFunction1D from an integration type. " },
|
||||
{"setIntegrationType", ( PyCFunction ) UnaryFunction1DEdgeNature_setIntegrationType, METH_VARARGS, "(IntegrationType i )Sets the integration method" },
|
||||
{"getIntegrationType", ( PyCFunction ) UnaryFunction1DEdgeNature_getIntegrationType, METH_NOARGS, "() Returns the integration method." },
|
||||
{NULL, NULL, 0, NULL}
|
||||
@@ -57,7 +56,7 @@ PyTypeObject UnaryFunction1DEdgeNature_Type = {
|
||||
/* More standard operations (here for binary compatibility) */
|
||||
|
||||
NULL, /* hashfunc tp_hash; */
|
||||
NULL, /* ternaryfunc tp_call; */
|
||||
(ternaryfunc)UnaryFunction1DEdgeNature___call__, /* ternaryfunc tp_call; */
|
||||
NULL, /* reprfunc tp_str; */
|
||||
NULL, /* getattrofunc tp_getattro; */
|
||||
NULL, /* setattrofunc tp_setattro; */
|
||||
@@ -173,13 +172,21 @@ PyObject * UnaryFunction1DEdgeNature_getName( BPy_UnaryFunction1DEdgeNature *sel
|
||||
return PyString_FromString( self->uf1D_edgenature->getName().c_str() );
|
||||
}
|
||||
|
||||
PyObject * UnaryFunction1DEdgeNature___call__( BPy_UnaryFunction1DEdgeNature *self, PyObject *args)
|
||||
PyObject * UnaryFunction1DEdgeNature___call__( BPy_UnaryFunction1DEdgeNature *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyObject *obj;
|
||||
|
||||
if( kwds != NULL ) {
|
||||
PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
|
||||
return NULL;
|
||||
}
|
||||
if( !PyArg_ParseTuple(args, "O!", &Interface1D_Type, &obj) )
|
||||
return NULL;
|
||||
|
||||
if( typeid(*(self->uf1D_edgenature)) == typeid(UnaryFunction1D<Nature::EdgeNature>) ) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_edgenature->operator()(*( ((BPy_Interface1D *) obj)->if1D )) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string msg(self->uf1D_edgenature->getName() + " __call__ method failed");
|
||||
|
||||
@@ -16,14 +16,13 @@ static void UnaryFunction1DFloat___dealloc__(BPy_UnaryFunction1DFloat* self);
|
||||
static PyObject * UnaryFunction1DFloat___repr__(BPy_UnaryFunction1DFloat* self);
|
||||
|
||||
static PyObject * UnaryFunction1DFloat_getName( BPy_UnaryFunction1DFloat *self);
|
||||
static PyObject * UnaryFunction1DFloat___call__( BPy_UnaryFunction1DFloat *self, PyObject *args);
|
||||
static PyObject * UnaryFunction1DFloat___call__( BPy_UnaryFunction1DFloat *self, PyObject *args, PyObject *kwds);
|
||||
static PyObject * UnaryFunction1DFloat_setIntegrationType(BPy_UnaryFunction1DFloat* self, PyObject *args);
|
||||
static PyObject * UnaryFunction1DFloat_getIntegrationType(BPy_UnaryFunction1DFloat* self);
|
||||
|
||||
/*----------------------UnaryFunction1DFloat instance definitions ----------------------------*/
|
||||
static PyMethodDef BPy_UnaryFunction1DFloat_methods[] = {
|
||||
{"getName", ( PyCFunction ) UnaryFunction1DFloat_getName, METH_NOARGS, "( )Returns the string of the name of the unary 1D function."},
|
||||
{"__call__", ( PyCFunction ) UnaryFunction1DFloat___call__, METH_VARARGS, "(Interface1D if1D )Builds a UnaryFunction1D from an integration type. " },
|
||||
{"setIntegrationType", ( PyCFunction ) UnaryFunction1DFloat_setIntegrationType, METH_VARARGS, "(IntegrationType i )Sets the integration method" },
|
||||
{"getIntegrationType", ( PyCFunction ) UnaryFunction1DFloat_getIntegrationType, METH_NOARGS, "() Returns the integration method." },
|
||||
{NULL, NULL, 0, NULL}
|
||||
@@ -55,7 +54,7 @@ PyTypeObject UnaryFunction1DFloat_Type = {
|
||||
/* More standard operations (here for binary compatibility) */
|
||||
|
||||
NULL, /* hashfunc tp_hash; */
|
||||
NULL, /* ternaryfunc tp_call; */
|
||||
(ternaryfunc)UnaryFunction1DFloat___call__, /* ternaryfunc tp_call; */
|
||||
NULL, /* reprfunc tp_str; */
|
||||
NULL, /* getattrofunc tp_getattro; */
|
||||
NULL, /* setattrofunc tp_setattro; */
|
||||
@@ -166,13 +165,21 @@ PyObject * UnaryFunction1DFloat_getName( BPy_UnaryFunction1DFloat *self )
|
||||
return PyString_FromString( self->uf1D_float->getName().c_str() );
|
||||
}
|
||||
|
||||
PyObject * UnaryFunction1DFloat___call__( BPy_UnaryFunction1DFloat *self, PyObject *args)
|
||||
PyObject * UnaryFunction1DFloat___call__( BPy_UnaryFunction1DFloat *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyObject *obj;
|
||||
|
||||
if( kwds != NULL ) {
|
||||
PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
|
||||
return NULL;
|
||||
}
|
||||
if( !PyArg_ParseTuple(args, "O!", &Interface1D_Type, &obj) )
|
||||
return NULL;
|
||||
|
||||
if( typeid(*(self->uf1D_float)) == typeid(UnaryFunction1D<float>) ) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_float->operator()(*( ((BPy_Interface1D *) obj)->if1D )) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string msg(self->uf1D_float->getName() + " __call__ method failed");
|
||||
|
||||
@@ -18,14 +18,13 @@ static void UnaryFunction1DUnsigned___dealloc__(BPy_UnaryFunction1DUnsigned* sel
|
||||
static PyObject * UnaryFunction1DUnsigned___repr__(BPy_UnaryFunction1DUnsigned* self);
|
||||
|
||||
static PyObject * UnaryFunction1DUnsigned_getName( BPy_UnaryFunction1DUnsigned *self);
|
||||
static PyObject * UnaryFunction1DUnsigned___call__( BPy_UnaryFunction1DUnsigned *self, PyObject *args);
|
||||
static PyObject * UnaryFunction1DUnsigned___call__( BPy_UnaryFunction1DUnsigned *self, PyObject *args, PyObject *kwds);
|
||||
static PyObject * UnaryFunction1DUnsigned_setIntegrationType(BPy_UnaryFunction1DUnsigned* self, PyObject *args);
|
||||
static PyObject * UnaryFunction1DUnsigned_getIntegrationType(BPy_UnaryFunction1DUnsigned* self);
|
||||
|
||||
/*----------------------UnaryFunction1DUnsigned instance definitions ----------------------------*/
|
||||
static PyMethodDef BPy_UnaryFunction1DUnsigned_methods[] = {
|
||||
{"getName", ( PyCFunction ) UnaryFunction1DUnsigned_getName, METH_NOARGS, "( )Returns the string of the name of the unary 1D function."},
|
||||
{"__call__", ( PyCFunction ) UnaryFunction1DUnsigned___call__, METH_VARARGS, "(Interface1D if1D )Builds a UnaryFunction1D from an integration type. " },
|
||||
{"setIntegrationType", ( PyCFunction ) UnaryFunction1DUnsigned_setIntegrationType, METH_VARARGS, "(IntegrationType i )Sets the integration method" },
|
||||
{"getIntegrationType", ( PyCFunction ) UnaryFunction1DUnsigned_getIntegrationType, METH_NOARGS, "() Returns the integration method." },
|
||||
{NULL, NULL, 0, NULL}
|
||||
@@ -57,7 +56,7 @@ PyTypeObject UnaryFunction1DUnsigned_Type = {
|
||||
/* More standard operations (here for binary compatibility) */
|
||||
|
||||
NULL, /* hashfunc tp_hash; */
|
||||
NULL, /* ternaryfunc tp_call; */
|
||||
(ternaryfunc)UnaryFunction1DUnsigned___call__, /* ternaryfunc tp_call; */
|
||||
NULL, /* reprfunc tp_str; */
|
||||
NULL, /* getattrofunc tp_getattro; */
|
||||
NULL, /* setattrofunc tp_setattro; */
|
||||
@@ -173,13 +172,21 @@ PyObject * UnaryFunction1DUnsigned_getName( BPy_UnaryFunction1DUnsigned *self )
|
||||
return PyString_FromString( self->uf1D_unsigned->getName().c_str() );
|
||||
}
|
||||
|
||||
PyObject * UnaryFunction1DUnsigned___call__( BPy_UnaryFunction1DUnsigned *self, PyObject *args)
|
||||
PyObject * UnaryFunction1DUnsigned___call__( BPy_UnaryFunction1DUnsigned *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyObject *obj;
|
||||
|
||||
if( kwds != NULL ) {
|
||||
PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
|
||||
return NULL;
|
||||
}
|
||||
if( !PyArg_ParseTuple(args, "O!", &Interface1D_Type, &obj) )
|
||||
return NULL;
|
||||
|
||||
if( typeid(*(self->uf1D_unsigned)) == typeid(UnaryFunction1D<unsigned int>) ) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_unsigned->operator()(*( ((BPy_Interface1D *) obj)->if1D )) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string msg(self->uf1D_unsigned->getName() + " __call__ method failed");
|
||||
|
||||
@@ -19,14 +19,13 @@ static void UnaryFunction1DVec2f___dealloc__(BPy_UnaryFunction1DVec2f* self);
|
||||
static PyObject * UnaryFunction1DVec2f___repr__(BPy_UnaryFunction1DVec2f* self);
|
||||
|
||||
static PyObject * UnaryFunction1DVec2f_getName( BPy_UnaryFunction1DVec2f *self);
|
||||
static PyObject * UnaryFunction1DVec2f___call__( BPy_UnaryFunction1DVec2f *self, PyObject *args);
|
||||
static PyObject * UnaryFunction1DVec2f___call__( BPy_UnaryFunction1DVec2f *self, PyObject *args, PyObject *kwds);
|
||||
static PyObject * UnaryFunction1DVec2f_setIntegrationType(BPy_UnaryFunction1DVec2f* self, PyObject *args);
|
||||
static PyObject * UnaryFunction1DVec2f_getIntegrationType(BPy_UnaryFunction1DVec2f* self);
|
||||
|
||||
/*----------------------UnaryFunction1DVec2f instance definitions ----------------------------*/
|
||||
static PyMethodDef BPy_UnaryFunction1DVec2f_methods[] = {
|
||||
{"getName", ( PyCFunction ) UnaryFunction1DVec2f_getName, METH_NOARGS, "( )Returns the string of the name of the unary 1D function."},
|
||||
{"__call__", ( PyCFunction ) UnaryFunction1DVec2f___call__, METH_VARARGS, "(Interface1D if1D )Builds a UnaryFunction1D from an integration type. " },
|
||||
{"setIntegrationType", ( PyCFunction ) UnaryFunction1DVec2f_setIntegrationType, METH_VARARGS, "(IntegrationType i )Sets the integration method" },
|
||||
{"getIntegrationType", ( PyCFunction ) UnaryFunction1DVec2f_getIntegrationType, METH_NOARGS, "() Returns the integration method." },
|
||||
{NULL, NULL, 0, NULL}
|
||||
@@ -58,7 +57,7 @@ PyTypeObject UnaryFunction1DVec2f_Type = {
|
||||
/* More standard operations (here for binary compatibility) */
|
||||
|
||||
NULL, /* hashfunc tp_hash; */
|
||||
NULL, /* ternaryfunc tp_call; */
|
||||
(ternaryfunc)UnaryFunction1DVec2f___call__, /* ternaryfunc tp_call; */
|
||||
NULL, /* reprfunc tp_str; */
|
||||
NULL, /* getattrofunc tp_getattro; */
|
||||
NULL, /* setattrofunc tp_setattro; */
|
||||
@@ -179,13 +178,21 @@ PyObject * UnaryFunction1DVec2f_getName( BPy_UnaryFunction1DVec2f *self )
|
||||
return PyString_FromString( self->uf1D_vec2f->getName().c_str() );
|
||||
}
|
||||
|
||||
PyObject * UnaryFunction1DVec2f___call__( BPy_UnaryFunction1DVec2f *self, PyObject *args)
|
||||
PyObject * UnaryFunction1DVec2f___call__( BPy_UnaryFunction1DVec2f *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyObject *obj;
|
||||
|
||||
if( kwds != NULL ) {
|
||||
PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
|
||||
return NULL;
|
||||
}
|
||||
if( !PyArg_ParseTuple(args, "O!", &Interface1D_Type, &obj) )
|
||||
return NULL;
|
||||
|
||||
if( typeid(*(self->uf1D_vec2f)) == typeid(UnaryFunction1D<Vec2f>) ) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_vec2f->operator()(*( ((BPy_Interface1D *) obj)->if1D )) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string msg(self->uf1D_vec2f->getName() + " __call__ method failed");
|
||||
|
||||
@@ -18,14 +18,13 @@ static void UnaryFunction1DVec3f___dealloc__(BPy_UnaryFunction1DVec3f* self);
|
||||
static PyObject * UnaryFunction1DVec3f___repr__(BPy_UnaryFunction1DVec3f* self);
|
||||
|
||||
static PyObject * UnaryFunction1DVec3f_getName( BPy_UnaryFunction1DVec3f *self);
|
||||
static PyObject * UnaryFunction1DVec3f___call__( BPy_UnaryFunction1DVec3f *self, PyObject *args);
|
||||
static PyObject * UnaryFunction1DVec3f___call__( BPy_UnaryFunction1DVec3f *self, PyObject *args, PyObject *kwds);
|
||||
static PyObject * UnaryFunction1DVec3f_setIntegrationType(BPy_UnaryFunction1DVec3f* self, PyObject *args);
|
||||
static PyObject * UnaryFunction1DVec3f_getIntegrationType(BPy_UnaryFunction1DVec3f* self);
|
||||
|
||||
/*----------------------UnaryFunction1DVec3f instance definitions ----------------------------*/
|
||||
static PyMethodDef BPy_UnaryFunction1DVec3f_methods[] = {
|
||||
{"getName", ( PyCFunction ) UnaryFunction1DVec3f_getName, METH_NOARGS, "( )Returns the string of the name of the unary 1D function."},
|
||||
{"__call__", ( PyCFunction ) UnaryFunction1DVec3f___call__, METH_VARARGS, "(Interface1D if1D )Builds a UnaryFunction1D from an integration type. " },
|
||||
{"setIntegrationType", ( PyCFunction ) UnaryFunction1DVec3f_setIntegrationType, METH_VARARGS, "(IntegrationType i )Sets the integration method" },
|
||||
{"getIntegrationType", ( PyCFunction ) UnaryFunction1DVec3f_getIntegrationType, METH_NOARGS, "() Returns the integration method." },
|
||||
{NULL, NULL, 0, NULL}
|
||||
@@ -57,7 +56,7 @@ PyTypeObject UnaryFunction1DVec3f_Type = {
|
||||
/* More standard operations (here for binary compatibility) */
|
||||
|
||||
NULL, /* hashfunc tp_hash; */
|
||||
NULL, /* ternaryfunc tp_call; */
|
||||
(ternaryfunc)UnaryFunction1DVec3f___call__, /* ternaryfunc tp_call; */
|
||||
NULL, /* reprfunc tp_str; */
|
||||
NULL, /* getattrofunc tp_getattro; */
|
||||
NULL, /* setattrofunc tp_setattro; */
|
||||
@@ -173,13 +172,21 @@ PyObject * UnaryFunction1DVec3f_getName( BPy_UnaryFunction1DVec3f *self )
|
||||
return PyString_FromString( self->uf1D_vec3f->getName().c_str() );
|
||||
}
|
||||
|
||||
PyObject * UnaryFunction1DVec3f___call__( BPy_UnaryFunction1DVec3f *self, PyObject *args)
|
||||
PyObject * UnaryFunction1DVec3f___call__( BPy_UnaryFunction1DVec3f *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyObject *obj;
|
||||
|
||||
if( kwds != NULL ) {
|
||||
PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
|
||||
return NULL;
|
||||
}
|
||||
if( !PyArg_ParseTuple(args, "O!", &Interface1D_Type, &obj) )
|
||||
return NULL;
|
||||
|
||||
if( typeid(*(self->uf1D_vec3f)) == typeid(UnaryFunction1D<Vec3f>) ) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_vec3f->operator()(*( ((BPy_Interface1D *) obj)->if1D )) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string msg(self->uf1D_vec3f->getName() + " __call__ method failed");
|
||||
|
||||
@@ -20,14 +20,13 @@ static void UnaryFunction1DVectorViewShape___dealloc__(BPy_UnaryFunction1DVector
|
||||
static PyObject * UnaryFunction1DVectorViewShape___repr__(BPy_UnaryFunction1DVectorViewShape* self);
|
||||
|
||||
static PyObject * UnaryFunction1DVectorViewShape_getName( BPy_UnaryFunction1DVectorViewShape *self);
|
||||
static PyObject * UnaryFunction1DVectorViewShape___call__( BPy_UnaryFunction1DVectorViewShape *self, PyObject *args);
|
||||
static PyObject * UnaryFunction1DVectorViewShape___call__( BPy_UnaryFunction1DVectorViewShape *self, PyObject *args, PyObject *kwds);
|
||||
static PyObject * UnaryFunction1DVectorViewShape_setIntegrationType(BPy_UnaryFunction1DVectorViewShape* self, PyObject *args);
|
||||
static PyObject * UnaryFunction1DVectorViewShape_getIntegrationType(BPy_UnaryFunction1DVectorViewShape* self);
|
||||
|
||||
/*----------------------UnaryFunction1DVectorViewShape instance definitions ----------------------------*/
|
||||
static PyMethodDef BPy_UnaryFunction1DVectorViewShape_methods[] = {
|
||||
{"getName", ( PyCFunction ) UnaryFunction1DVectorViewShape_getName, METH_NOARGS, "( )Returns the string of the name of the unary 1D function."},
|
||||
{"__call__", ( PyCFunction ) UnaryFunction1DVectorViewShape___call__, METH_VARARGS, "(Interface1D if1D )Builds a UnaryFunction1D from an integration type. " },
|
||||
{"setIntegrationType", ( PyCFunction ) UnaryFunction1DVectorViewShape_setIntegrationType, METH_VARARGS, "(IntegrationType i )Sets the integration method" },
|
||||
{"getIntegrationType", ( PyCFunction ) UnaryFunction1DVectorViewShape_getIntegrationType, METH_NOARGS, "() Returns the integration method." },
|
||||
{NULL, NULL, 0, NULL}
|
||||
@@ -59,7 +58,7 @@ PyTypeObject UnaryFunction1DVectorViewShape_Type = {
|
||||
/* More standard operations (here for binary compatibility) */
|
||||
|
||||
NULL, /* hashfunc tp_hash; */
|
||||
NULL, /* ternaryfunc tp_call; */
|
||||
(ternaryfunc)UnaryFunction1DVectorViewShape___call__, /* ternaryfunc tp_call; */
|
||||
NULL, /* reprfunc tp_str; */
|
||||
NULL, /* getattrofunc tp_getattro; */
|
||||
NULL, /* setattrofunc tp_setattro; */
|
||||
@@ -187,13 +186,21 @@ PyObject * UnaryFunction1DVectorViewShape_getName( BPy_UnaryFunction1DVectorView
|
||||
return PyString_FromString( self->uf1D_vectorviewshape->getName().c_str() );
|
||||
}
|
||||
|
||||
PyObject * UnaryFunction1DVectorViewShape___call__( BPy_UnaryFunction1DVectorViewShape *self, PyObject *args)
|
||||
PyObject * UnaryFunction1DVectorViewShape___call__( BPy_UnaryFunction1DVectorViewShape *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyObject *obj;
|
||||
|
||||
if( kwds != NULL ) {
|
||||
PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
|
||||
return NULL;
|
||||
}
|
||||
if( !PyArg_ParseTuple(args, "O!", &Interface1D_Type, &obj) )
|
||||
return NULL;
|
||||
|
||||
if( typeid(*(self->uf1D_vectorviewshape)) == typeid(UnaryFunction1D<std::vector<ViewShape*>>) ) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_vectorviewshape->operator()(*( ((BPy_Interface1D *) obj)->if1D )) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string msg(self->uf1D_vectorviewshape->getName() + " __call__ method failed");
|
||||
|
||||
@@ -21,7 +21,7 @@ static void UnaryFunction1DVoid___dealloc__(BPy_UnaryFunction1DVoid* self);
|
||||
static PyObject * UnaryFunction1DVoid___repr__(BPy_UnaryFunction1DVoid* self);
|
||||
|
||||
static PyObject * UnaryFunction1DVoid_getName( BPy_UnaryFunction1DVoid *self);
|
||||
static PyObject * UnaryFunction1DVoid___call__( BPy_UnaryFunction1DVoid *self, PyObject *args);
|
||||
static PyObject * UnaryFunction1DVoid___call__( BPy_UnaryFunction1DVoid *self, PyObject *args, PyObject *kwds);
|
||||
|
||||
static PyObject * UnaryFunction1DVoid_setIntegrationType(BPy_UnaryFunction1DVoid* self, PyObject *args);
|
||||
static PyObject * UnaryFunction1DVoid_getIntegrationType(BPy_UnaryFunction1DVoid* self);
|
||||
@@ -29,7 +29,6 @@ static PyObject * UnaryFunction1DVoid_getIntegrationType(BPy_UnaryFunction1DVoid
|
||||
/*----------------------UnaryFunction1DVoid instance definitions ----------------------------*/
|
||||
static PyMethodDef BPy_UnaryFunction1DVoid_methods[] = {
|
||||
{"getName", ( PyCFunction ) UnaryFunction1DVoid_getName, METH_NOARGS, "( )Returns the string of the name of the unary 1D function."},
|
||||
{"__call__", ( PyCFunction ) UnaryFunction1DVoid___call__, METH_VARARGS, "(Interface1D if1D )Builds a UnaryFunction1D from an integration type. " },
|
||||
{"setIntegrationType", ( PyCFunction ) UnaryFunction1DVoid_setIntegrationType, METH_VARARGS, "(IntegrationType i )Sets the integration method" },
|
||||
{"getIntegrationType", ( PyCFunction ) UnaryFunction1DVoid_getIntegrationType, METH_NOARGS, "() Returns the integration method." },
|
||||
{NULL, NULL, 0, NULL}
|
||||
@@ -61,7 +60,7 @@ PyTypeObject UnaryFunction1DVoid_Type = {
|
||||
/* More standard operations (here for binary compatibility) */
|
||||
|
||||
NULL, /* hashfunc tp_hash; */
|
||||
NULL, /* ternaryfunc tp_call; */
|
||||
(ternaryfunc)UnaryFunction1DVoid___call__, /* ternaryfunc tp_call; */
|
||||
NULL, /* reprfunc tp_str; */
|
||||
NULL, /* getattrofunc tp_getattro; */
|
||||
NULL, /* setattrofunc tp_setattro; */
|
||||
@@ -188,13 +187,21 @@ PyObject * UnaryFunction1DVoid_getName( BPy_UnaryFunction1DVoid *self )
|
||||
return PyString_FromString( self->uf1D_void->getName().c_str() );
|
||||
}
|
||||
|
||||
PyObject * UnaryFunction1DVoid___call__( BPy_UnaryFunction1DVoid *self, PyObject *args)
|
||||
PyObject * UnaryFunction1DVoid___call__( BPy_UnaryFunction1DVoid *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyObject *obj;
|
||||
|
||||
if( kwds != NULL ) {
|
||||
PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
|
||||
return NULL;
|
||||
}
|
||||
if( !PyArg_ParseTuple(args, "O!", &Interface1D_Type, &obj) )
|
||||
return NULL;
|
||||
|
||||
if( typeid(*(self->uf1D_void)) == typeid(UnaryFunction1D_void) ) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method must be overloaded");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_void->operator()(*( ((BPy_Interface1D *) obj)->if1D )) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string msg(self->uf1D_void->getName() + " __call__ method failed");
|
||||
|
||||
Reference in New Issue
Block a user