BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
OutputDataReader.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Device/InputOutput/OutputDataReader.h
6 //! @brief Defines class OutputDataReader.
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************** //
14 
15 #ifndef BORNAGAIN_CORE_INPUTOUTPUT_OUTPUTDATAREADER_H
16 #define BORNAGAIN_CORE_INPUTOUTPUT_OUTPUTDATAREADER_H
17 
19 #include <memory>
20 
21 template <class T> class OutputData;
22 
23 //! Reads OutputData from file using different reading strategies.
24 //! @ingroup input_output_internal
25 
27 {
28 public:
29  OutputDataReader(const std::string& file_name);
30 
31  //! read output data from file (file name was set already from OutputDataIOFactory)
33 
34  //! Sets concrete reading strategy
35  void setStrategy(IOutputDataReadStrategy* read_strategy);
36 
37 private:
38  std::string m_file_name;
39  std::unique_ptr<IOutputDataReadStrategy> m_read_strategy;
40 };
41 
42 #endif // BORNAGAIN_CORE_INPUTOUTPUT_OUTPUTDATAREADER_H
Defines IOutputDataReadStrategy and related classes.
Interface for reading strategy of OutputData from file.
Reads OutputData from file using different reading strategies.
OutputData< double > * getOutputData()
read output data from file (file name was set already from OutputDataIOFactory)
void setStrategy(IOutputDataReadStrategy *read_strategy)
Sets concrete reading strategy.
std::unique_ptr< IOutputDataReadStrategy > m_read_strategy
OutputDataReader(const std::string &file_name)
std::string m_file_name
Template class to store data of any type in multi-dimensional space.
Definition: OutputData.h:33