BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
jsonutils.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // qt-mvvm: Model-view-view-model framework for large GUI applications
4 //
5 //! @file mvvm/model/mvvm/serialization/jsonutils.h
6 //! @brief Defines class CLASS?
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2020
11 //! @authors Gennady Pospelov et al, Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_MVVM_MODEL_MVVM_SERIALIZATION_JSONUTILS_H
16 #define BORNAGAIN_MVVM_MODEL_MVVM_SERIALIZATION_JSONUTILS_H
17 
18 #include "mvvm/model_export.h"
19 #include <string>
20 
21 namespace ModelView {
22 
23 class SessionModel;
24 class RealLimits;
25 
26 namespace JsonUtils {
27 
28 //! Returns multiline string representing model content as json.
29 MVVM_MODEL_EXPORT std::string ModelToJsonString(const SessionModel& model);
30 
31 //! Returns string representation of RealLimits.
32 MVVM_MODEL_EXPORT std::string ToString(const RealLimits& limits);
33 
34 MVVM_MODEL_EXPORT RealLimits CreateLimits(const std::string& text, double min = 0.0,
35  double max = 0.0);
36 
37 } // namespace JsonUtils
38 
39 } // namespace ModelView
40 
41 #endif // BORNAGAIN_MVVM_MODEL_MVVM_SERIALIZATION_JSONUTILS_H
Limits for double.
Definition: reallimits.h:25
Main class to hold hierarchy of SessionItem objects.
Definition: sessionmodel.h:37
Limits for a real fit parameter.
Definition: RealLimits.h:24
MVVM_MODEL_EXPORT RealLimits CreateLimits(const std::string &text, double min=0.0, double max=0.0)
Definition: jsonutils.cpp:60
MVVM_MODEL_EXPORT std::string ToString(const RealLimits &limits)
Returns string representation of RealLimits.
Definition: jsonutils.cpp:42
MVVM_MODEL_EXPORT std::string ModelToJsonString(const SessionModel &model)
Returns multiline string representing model content as json.
Definition: jsonutils.cpp:34
materialitems.h Collection of materials to populate MaterialModel.