BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
SimulationToPython.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Core/Export/SimulationToPython.h
6 //! @brief Defines class SimulationToPython.
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 #ifdef SWIG
16 #error no need to expose this header to Swig
17 #endif
18 
19 #ifndef USER_API
20 #ifndef BORNAGAIN_CORE_EXPORT_SIMULATIONTOPYTHON_H
21 #define BORNAGAIN_CORE_EXPORT_SIMULATIONTOPYTHON_H
22 
23 #include <string>
24 
25 class ISimulation;
26 
27 //! Write a Python script that allows to run the current simulation.
28 
30 public:
31  //! Returns a Python script that runs a simulation and plots the result
32  std::string simulationPlotCode(const ISimulation& simulation);
33  //! Returns a Python script that runs a simulation and saves the result to a file
34  std::string simulationSaveCode(const ISimulation& simulation, const std::string& fname);
35 };
36 
37 #endif // BORNAGAIN_CORE_EXPORT_SIMULATIONTOPYTHON_H
38 #endif // USER_API
Abstract base class of OffSpecularSimulation, GISASSimulation and SpecularSimulation.
Definition: ISimulation.h:38
Write a Python script that allows to run the current simulation.
std::string simulationSaveCode(const ISimulation &simulation, const std::string &fname)
Returns a Python script that runs a simulation and saves the result to a file.
std::string simulationPlotCode(const ISimulation &simulation)
Returns a Python script that runs a simulation and plots the result.