From 5afc2bd65d610ed7d59faddcce78b2cac9a4c4b3 Mon Sep 17 00:00:00 2001 From: Matthias Puchner <github@mpuchner.de> Date: Wed, 19 May 2021 11:00:10 +0200 Subject: [PATCH] autogen swig/py --- auto/Wrap/libBornAgainBase_wrap.cpp | 2 +- auto/Wrap/libBornAgainDevice.py | 12 ++-- auto/Wrap/libBornAgainDevice_wrap.cpp | 93 +++++---------------------- 3 files changed, 24 insertions(+), 83 deletions(-) diff --git a/auto/Wrap/libBornAgainBase_wrap.cpp b/auto/Wrap/libBornAgainBase_wrap.cpp index 38e0bbbb45f..1f2a790829b 100644 --- a/auto/Wrap/libBornAgainBase_wrap.cpp +++ b/auto/Wrap/libBornAgainBase_wrap.cpp @@ -5665,7 +5665,7 @@ SWIG_AsVal_std_complex_Sl_double_Sg_ (PyObject *o, std::complex<double>* val) SWIGINTERNINLINE PyObject* -SWIG_From_std_complex_Sl_double_Sg_ (/*@SWIG:/usr/local/share/swig/4.0.2/typemaps/swigmacros.swg,104,%ifcplusplus@*/ +SWIG_From_std_complex_Sl_double_Sg_ (/*@SWIG:C:\Program Files (x86)\swigwin-4.0.2\Lib\typemaps\swigmacros.swg,104,%ifcplusplus@*/ const std::complex<double>& diff --git a/auto/Wrap/libBornAgainDevice.py b/auto/Wrap/libBornAgainDevice.py index 641e761310e..f17072a6a51 100644 --- a/auto/Wrap/libBornAgainDevice.py +++ b/auto/Wrap/libBornAgainDevice.py @@ -3978,13 +3978,13 @@ class IDetector(libBornAgainBase.ICloneable, libBornAgainParam.INode): """ return _libBornAgainDevice.IDetector_getChildren(self) - def iterate(self, func, visit_masks=False): - r""" - iterate(IDetector self, std::function< void (IDetector::const_iterator) > func, bool visit_masks=False) - void IDetector::iterate(std::function< void(const_iterator)> func, bool visit_masks=false) const + def iterateOverRegionOfInterest(self, func): + r"""iterateOverRegionOfInterest(IDetector self, std::function< void (IDetector::const_iterator) > func)""" + return _libBornAgainDevice.IDetector_iterateOverRegionOfInterest(self, func) - """ - return _libBornAgainDevice.IDetector_iterate(self, func, visit_masks) + def iterateOverNonMaskedPoints(self, func): + r"""iterateOverNonMaskedPoints(IDetector self, std::function< void (IDetector::const_iterator) > func)""" + return _libBornAgainDevice.IDetector_iterateOverNonMaskedPoints(self, func) def axes(self): r""" diff --git a/auto/Wrap/libBornAgainDevice_wrap.cpp b/auto/Wrap/libBornAgainDevice_wrap.cpp index 34c51a8cc33..fb1d21f6e1a 100644 --- a/auto/Wrap/libBornAgainDevice_wrap.cpp +++ b/auto/Wrap/libBornAgainDevice_wrap.cpp @@ -5717,7 +5717,7 @@ SWIG_AsVal_std_complex_Sl_double_Sg_ (PyObject *o, std::complex<double>* val) SWIGINTERNINLINE PyObject* -SWIG_From_std_complex_Sl_double_Sg_ (/*@SWIG:/usr/local/share/swig/4.0.2/typemaps/swigmacros.swg,104,%ifcplusplus@*/ +SWIG_From_std_complex_Sl_double_Sg_ (/*@SWIG:C:\Program Files (x86)\swigwin-4.0.2\Lib\typemaps\swigmacros.swg,104,%ifcplusplus@*/ const std::complex<double>& @@ -35691,43 +35691,36 @@ fail: } -SWIGINTERN PyObject *_wrap_IDetector_iterate__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { +SWIGINTERN PyObject *_wrap_IDetector_iterateOverRegionOfInterest(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; IDetector *arg1 = (IDetector *) 0 ; std::function< void (IDetector::const_iterator) > arg2 ; - bool arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; + PyObject *swig_obj[2] ; - if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + if (!SWIG_Python_UnpackTuple(args, "IDetector_iterateOverRegionOfInterest", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_iterate" "', argument " "1"" of type '" "IDetector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_iterateOverRegionOfInterest" "', argument " "1"" of type '" "IDetector const *""'"); } arg1 = reinterpret_cast< IDetector * >(argp1); { res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__functionT_void_fSimulationAreaIterator_const_RF_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetector_iterate" "', argument " "2"" of type '" "std::function< void (IDetector::const_iterator) >""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetector_iterateOverRegionOfInterest" "', argument " "2"" of type '" "std::function< void (IDetector::const_iterator) >""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector_iterate" "', argument " "2"" of type '" "std::function< void (IDetector::const_iterator) >""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector_iterateOverRegionOfInterest" "', argument " "2"" of type '" "std::function< void (IDetector::const_iterator) >""'"); } else { std::function< void (IDetector::const_iterator) > * temp = reinterpret_cast< std::function< void (IDetector::const_iterator) > * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } - ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IDetector_iterate" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - ((IDetector const *)arg1)->iterate(arg2,arg3); + ((IDetector const *)arg1)->iterateOverRegionOfInterest(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -35735,7 +35728,7 @@ fail: } -SWIGINTERN PyObject *_wrap_IDetector_iterate__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) { +SWIGINTERN PyObject *_wrap_IDetector_iterateOverNonMaskedPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; IDetector *arg1 = (IDetector *) 0 ; std::function< void (IDetector::const_iterator) > arg2 ; @@ -35743,27 +35736,28 @@ SWIGINTERN PyObject *_wrap_IDetector_iterate__SWIG_1(PyObject *SWIGUNUSEDPARM(se int res1 = 0 ; void *argp2 ; int res2 = 0 ; + PyObject *swig_obj[2] ; - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + if (!SWIG_Python_UnpackTuple(args, "IDetector_iterateOverNonMaskedPoints", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_IDetector, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_iterate" "', argument " "1"" of type '" "IDetector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDetector_iterateOverNonMaskedPoints" "', argument " "1"" of type '" "IDetector const *""'"); } arg1 = reinterpret_cast< IDetector * >(argp1); { res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__functionT_void_fSimulationAreaIterator_const_RF_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetector_iterate" "', argument " "2"" of type '" "std::function< void (IDetector::const_iterator) >""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetector_iterateOverNonMaskedPoints" "', argument " "2"" of type '" "std::function< void (IDetector::const_iterator) >""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector_iterate" "', argument " "2"" of type '" "std::function< void (IDetector::const_iterator) >""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector_iterateOverNonMaskedPoints" "', argument " "2"" of type '" "std::function< void (IDetector::const_iterator) >""'"); } else { std::function< void (IDetector::const_iterator) > * temp = reinterpret_cast< std::function< void (IDetector::const_iterator) > * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } - ((IDetector const *)arg1)->iterate(arg2); + ((IDetector const *)arg1)->iterateOverNonMaskedPoints(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -35771,56 +35765,6 @@ fail: } -SWIGINTERN PyObject *_wrap_IDetector_iterate(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "IDetector_iterate", 0, 3, argv))) SWIG_fail; - --argc; - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_IDetector, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__functionT_void_fSimulationAreaIterator_const_RF_t, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_IDetector_iterate__SWIG_1(self, argc, argv); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_IDetector, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__functionT_void_fSimulationAreaIterator_const_RF_t, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_IDetector_iterate__SWIG_0(self, argc, argv); - } - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IDetector_iterate'.\n" - " Possible C/C++ prototypes are:\n" - " IDetector::iterate(std::function< void (IDetector::const_iterator) >,bool) const\n" - " IDetector::iterate(std::function< void (IDetector::const_iterator) >) const\n"); - return 0; -} - - SWIGINTERN PyObject *_wrap_IDetector_axes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; IDetector *arg1 = (IDetector *) 0 ; @@ -45335,11 +45279,8 @@ static PyMethodDef SwigMethods[] = { "std::vector< const INode * > IDetector::getChildren() const override\n" "\n" ""}, - { "IDetector_iterate", _wrap_IDetector_iterate, METH_VARARGS, "\n" - "IDetector_iterate(IDetector self, std::function< void (IDetector::const_iterator) > func, bool visit_masks=False)\n" - "void IDetector::iterate(std::function< void(const_iterator)> func, bool visit_masks=false) const\n" - "\n" - ""}, + { "IDetector_iterateOverRegionOfInterest", _wrap_IDetector_iterateOverRegionOfInterest, METH_VARARGS, "IDetector_iterateOverRegionOfInterest(IDetector self, std::function< void (IDetector::const_iterator) > func)"}, + { "IDetector_iterateOverNonMaskedPoints", _wrap_IDetector_iterateOverNonMaskedPoints, METH_VARARGS, "IDetector_iterateOverNonMaskedPoints(IDetector self, std::function< void (IDetector::const_iterator) > func)"}, { "IDetector_axes", _wrap_IDetector_axes, METH_O, "\n" "IDetector_axes(IDetector self) -> CloneableVector< IAxis > const &\n" "const CloneableVector<IAxis>& IDetector::axes() const\n" -- GitLab