From df8e558f648464d858876132304572e2c7115d50 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de> Date: Wed, 10 May 2023 22:02:44 +0200 Subject: [PATCH] rm from swig --- Device/IO/IOFactory.h | 2 + auto/Wrap/libBornAgainDevice.py | 8 ---- auto/Wrap/libBornAgainDevice_wrap.cpp | 62 --------------------------- 3 files changed, 2 insertions(+), 70 deletions(-) diff --git a/Device/IO/IOFactory.h b/Device/IO/IOFactory.h index d02bd4f88dc..3087d6741bf 100644 --- a/Device/IO/IOFactory.h +++ b/Device/IO/IOFactory.h @@ -23,8 +23,10 @@ namespace IO { enum Filetype { nil, bornagain, tiff, nicos, mft }; +#ifndef SWIG bool isCompressed(const std::string& name); Filetype filename2type(const std::string& filename); +#endif //! Reads 1D data file and returns newly created Datafield object. //! If selector is 'nil', then the file extension will determine the loader to be used. diff --git a/auto/Wrap/libBornAgainDevice.py b/auto/Wrap/libBornAgainDevice.py index 26864d5ff40..f67daa4a817 100644 --- a/auto/Wrap/libBornAgainDevice.py +++ b/auto/Wrap/libBornAgainDevice.py @@ -3000,14 +3000,6 @@ nicos = _libBornAgainDevice.nicos mft = _libBornAgainDevice.mft -def isCompressed(name): - r"""isCompressed(std::string const & name) -> bool""" - return _libBornAgainDevice.isCompressed(name) - -def filename2type(filename): - r"""filename2type(std::string const & filename) -> IO::Filetype""" - return _libBornAgainDevice.filename2type(filename) - def readData1D(*args): r"""readData1D(std::string const & file_name, IO::Filetype selector=nil) -> Datafield""" return _libBornAgainDevice.readData1D(*args) diff --git a/auto/Wrap/libBornAgainDevice_wrap.cpp b/auto/Wrap/libBornAgainDevice_wrap.cpp index 1db2a529513..f501458ed4b 100644 --- a/auto/Wrap/libBornAgainDevice_wrap.cpp +++ b/auto/Wrap/libBornAgainDevice_wrap.cpp @@ -36182,66 +36182,6 @@ SWIGINTERN PyObject *SphericalDetector_swiginit(PyObject *SWIGUNUSEDPARM(self), return SWIG_Python_InitShadowInstance(args); } -SWIGINTERN PyObject *_wrap_isCompressed(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject *swig_obj[1] ; - bool result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "isCompressed" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "isCompressed" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - result = (bool)IO::isCompressed((std::string const &)*arg1); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_filename2type(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject *swig_obj[1] ; - IO::Filetype result; - - if (!args) SWIG_fail; - swig_obj[0] = args; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "filename2type" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "filename2type" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - result = (IO::Filetype)IO::filename2type((std::string const &)*arg1); - resultobj = SWIG_From_int(static_cast< int >(result)); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - SWIGINTERN PyObject *_wrap_readData1D__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::string *arg1 = 0 ; @@ -38322,8 +38262,6 @@ static PyMethodDef SwigMethods[] = { { "SphericalDetector_indexOfSpecular", _wrap_SphericalDetector_indexOfSpecular, METH_VARARGS, "SphericalDetector_indexOfSpecular(SphericalDetector self, Beam beam) -> size_t"}, { "SphericalDetector_swigregister", SphericalDetector_swigregister, METH_O, NULL}, { "SphericalDetector_swiginit", SphericalDetector_swiginit, METH_VARARGS, NULL}, - { "isCompressed", _wrap_isCompressed, METH_O, "isCompressed(std::string const & name) -> bool"}, - { "filename2type", _wrap_filename2type, METH_O, "filename2type(std::string const & filename) -> IO::Filetype"}, { "readData1D", _wrap_readData1D, METH_VARARGS, "readData1D(std::string const & file_name, IO::Filetype selector=nil) -> Datafield"}, { "readData2D", _wrap_readData2D, METH_VARARGS, "readData2D(std::string const & file_name, IO::Filetype selector=nil) -> Datafield"}, { "writeDatafield", _wrap_writeDatafield, METH_VARARGS, "writeDatafield(Datafield data, std::string const & file_name)"}, -- GitLab