diff --git a/Core/Instrument/SimulationResult.h b/Core/Instrument/SimulationResult.h index 2afe21444eb2c98579676db2c05d82032e696a3e..326cdc80555e7a5f77e1c647db289b419a8cae8c 100644 --- a/Core/Instrument/SimulationResult.h +++ b/Core/Instrument/SimulationResult.h @@ -50,7 +50,10 @@ public: SimulationResult& operator=(const SimulationResult& other); SimulationResult& operator=(SimulationResult&& other); +#ifndef SWIG OutputData<double>* data(AxesUnits units = AxesUnits::DEFAULT) const; +#endif + Histogram2D* histogram2d(AxesUnits units = AxesUnits::DEFAULT) const; //! Provide AxisInfo for each axis and the given units diff --git a/Wrap/swig/libBornAgainCore.i b/Wrap/swig/libBornAgainCore.i index c28f4ce405d292cf86834b34ea9aa8abfff752e2..04d574472fc7fac6e31e498288537303a29ebc02 100644 --- a/Wrap/swig/libBornAgainCore.i +++ b/Wrap/swig/libBornAgainCore.i @@ -245,7 +245,6 @@ %newobject ScanResolution::scanRelativeResolution; %newobject ScanResolution::scanAbsoluteResolution; -%newobject SimulationResult::data(AxesUnits units_type = AxesUnits::DEFAULT) const; %newobject SimulationResult::histogram2d(AxesUnits units_type = AxesUnits::DEFAULT) const; %newobject IntensityDataIOFactory::readOutputData(const std::string& file_name); diff --git a/auto/Wrap/libBornAgainCore.py b/auto/Wrap/libBornAgainCore.py index 117ef31cb54f0dd4df5e14a2e878328572204d08..022acaa34ebf9d49b0b95164cc1be94db16ed556 100644 --- a/auto/Wrap/libBornAgainCore.py +++ b/auto/Wrap/libBornAgainCore.py @@ -18297,17 +18297,6 @@ class SimulationResult(_object): except __builtin__.Exception: self.this = this - def data(self, *args): - """ - data(SimulationResult self, AxesUnits units) -> IntensityData - data(SimulationResult self) -> IntensityData - - OutputData< double > * SimulationResult::data(AxesUnits units=AxesUnits::DEFAULT) const - - """ - return _libBornAgainCore.SimulationResult_data(self, *args) - - def histogram2d(self, *args): """ histogram2d(SimulationResult self, AxesUnits units) -> Histogram2D diff --git a/auto/Wrap/libBornAgainCore_wrap.cpp b/auto/Wrap/libBornAgainCore_wrap.cpp index caa0343cfa86eac44df2e64339f70ae427668952..381df534f3da73916a6380f4fda5845c9499c6f0 100644 --- a/auto/Wrap/libBornAgainCore_wrap.cpp +++ b/auto/Wrap/libBornAgainCore_wrap.cpp @@ -86549,105 +86549,6 @@ fail: } -SWIGINTERN PyObject *_wrap_SimulationResult_data__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - SimulationResult *arg1 = (SimulationResult *) 0 ; - AxesUnits arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - OutputData< double > *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:SimulationResult_data",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SimulationResult, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulationResult_data" "', argument " "1"" of type '" "SimulationResult const *""'"); - } - arg1 = reinterpret_cast< SimulationResult * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulationResult_data" "', argument " "2"" of type '" "AxesUnits""'"); - } - arg2 = static_cast< AxesUnits >(val2); - result = (OutputData< double > *)((SimulationResult const *)arg1)->data(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OutputDataT_double_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SimulationResult_data__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - SimulationResult *arg1 = (SimulationResult *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - OutputData< double > *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SimulationResult_data",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SimulationResult, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulationResult_data" "', argument " "1"" of type '" "SimulationResult const *""'"); - } - arg1 = reinterpret_cast< SimulationResult * >(argp1); - result = (OutputData< double > *)((SimulationResult const *)arg1)->data(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OutputDataT_double_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SimulationResult_data(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - Py_ssize_t ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SimulationResult, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SimulationResult_data__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SimulationResult, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_SimulationResult_data__SWIG_0(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SimulationResult_data'.\n" - " Possible C/C++ prototypes are:\n" - " SimulationResult::data(AxesUnits) const\n" - " SimulationResult::data() const\n"); - return 0; -} - - SWIGINTERN PyObject *_wrap_SimulationResult_histogram2d__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SimulationResult *arg1 = (SimulationResult *) 0 ; @@ -133538,13 +133439,6 @@ static PyMethodDef SwigMethods[] = { "SimulationResult::SimulationResult(SimulationResult &&other)\n" "\n" ""}, - { (char *)"SimulationResult_data", _wrap_SimulationResult_data, METH_VARARGS, (char *)"\n" - "data(AxesUnits units) -> IntensityData\n" - "SimulationResult_data(SimulationResult self) -> IntensityData\n" - "\n" - "OutputData< double > * SimulationResult::data(AxesUnits units=AxesUnits::DEFAULT) const\n" - "\n" - ""}, { (char *)"SimulationResult_histogram2d", _wrap_SimulationResult_histogram2d, METH_VARARGS, (char *)"\n" "histogram2d(AxesUnits units) -> Histogram2D\n" "SimulationResult_histogram2d(SimulationResult self) -> Histogram2D\n"