Skip to content
Snippets Groups Projects
Commit 4809ed09 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

class -> namespace

parent 9d152e6f
No related branches found
No related tags found
1 merge request!474Restore subroutine to read Nicos/SANSDRaw files, check for Nicos file type, provide unit test
...@@ -50,7 +50,7 @@ OutputData<double>* IntensityDataIOFactory::readOutputData(const std::string& fi ...@@ -50,7 +50,7 @@ OutputData<double>* IntensityDataIOFactory::readOutputData(const std::string& fi
if (readAs(nicos)) if (readAs(nicos))
return readOutputData(file_name, [](std::istream& s) { return readOutputData(file_name, [](std::istream& s) {
return OutputDataReadWriteNicos().readOutputData(s); return IO::readNicosData(s);
}); });
#ifdef BORNAGAIN_TIFF_SUPPORT #ifdef BORNAGAIN_TIFF_SUPPORT
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// BornAgain: simulate and fit reflection and scattering // BornAgain: simulate and fit reflection and scattering
// //
//! @file Device/InputOutput/OutputDataReadWriteNicos.cpp //! @file Device/InputOutput/OutputDataReadWriteNicos.cpp
//! @brief Implements class OutputDataReadWriteNicos //! @brief Implements function IO::readNicosData
//! //!
//! @homepage http://www.bornagainproject.org //! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING) //! @license GNU General Public License v3 or higher (see COPYING)
...@@ -44,7 +44,7 @@ unsigned int readAssignedPositiveIntValue(const std::string& line, int lineNumbe ...@@ -44,7 +44,7 @@ unsigned int readAssignedPositiveIntValue(const std::string& line, int lineNumbe
} // namespace } // namespace
OutputData<double>* OutputDataReadWriteNicos::readOutputData(std::istream& input_stream) OutputData<double>* IO::readNicosData(std::istream& input_stream)
{ {
auto result = std::make_unique<OutputData<double>>(); // as unique ptr to ensure delete on throw auto result = std::make_unique<OutputData<double>>(); // as unique ptr to ensure delete on throw
std::string line; std::string line;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// BornAgain: simulate and fit reflection and scattering // BornAgain: simulate and fit reflection and scattering
// //
//! @file Device/InputOutput/OutputDataReadWriteNicos.h //! @file Device/InputOutput/OutputDataReadWriteNicos.h
//! @brief Defines class OutputDataReadWriteNicos //! @brief Defines function IO::readNicosData
//! //!
//! @homepage http://www.bornagainproject.org //! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING) //! @license GNU General Public License v3 or higher (see COPYING)
...@@ -19,9 +19,10 @@ ...@@ -19,9 +19,10 @@
//! Read/write SANSDRaw files written by Nicos (*.001). //! Read/write SANSDRaw files written by Nicos (*.001).
class OutputDataReadWriteNicos { namespace IO {
public:
OutputData<double>* readOutputData(std::istream& input_stream); OutputData<double>* readNicosData(std::istream& input_stream);
}; };
#endif // BORNAGAIN_DEVICE_INPUTOUTPUT_OUTPUTDATAREADWRITENICOS_H #endif // BORNAGAIN_DEVICE_INPUTOUTPUT_OUTPUTDATAREADWRITENICOS_H
...@@ -2118,18 +2118,6 @@ C++ includes: OutputDataReadWriteINT.h ...@@ -2118,18 +2118,6 @@ C++ includes: OutputDataReadWriteINT.h
"; ";
// File: classOutputDataReadWriteNicos.xml
%feature("docstring") OutputDataReadWriteNicos "
Read/write SANSDRaw files written by Nicos (*.001).
C++ includes: OutputDataReadWriteNicos.h
";
%feature("docstring") OutputDataReadWriteNicos::readOutputData "OutputData< double > * OutputDataReadWriteNicos::readOutputData(std::istream &input_stream)
";
// File: classOutputDataReadWriteNumpyTXT.xml // File: classOutputDataReadWriteNumpyTXT.xml
%feature("docstring") OutputDataReadWriteNumpyTXT " %feature("docstring") OutputDataReadWriteNumpyTXT "
...@@ -2964,6 +2952,11 @@ Returns true if SimulatioResult agrees with data from reference file. ...@@ -2964,6 +2952,11 @@ Returns true if SimulatioResult agrees with data from reference file.
"; ";
// File: namespaceIO.xml
%feature("docstring") IO::readNicosData "OutputData< double > * IO::readNicosData(std::istream &input_stream)
";
// File: Beam_8cpp.xml // File: Beam_8cpp.xml
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment