BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
jsonmodelconverterinterface.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/jsonmodelconverterinterface.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_JSONMODELCONVERTERINTERFACE_H
16 #define BORNAGAIN_MVVM_MODEL_MVVM_SERIALIZATION_JSONMODELCONVERTERINTERFACE_H
17 
18 #include "mvvm/model_export.h"
19 
20 class QJsonObject;
21 
22 namespace ModelView {
23 
24 class SessionModel;
25 
26 //! Base class for all converters of SessionModel to/from json object.
27 
28 class MVVM_MODEL_EXPORT JsonModelConverterInterface {
29 public:
30  virtual ~JsonModelConverterInterface() = default;
31 
32  virtual QJsonObject to_json(const SessionModel&) const = 0;
33 
34  virtual void from_json(const QJsonObject&, SessionModel&) const = 0;
35 };
36 
37 } // namespace ModelView
38 
39 #endif // BORNAGAIN_MVVM_MODEL_MVVM_SERIALIZATION_JSONMODELCONVERTERINTERFACE_H
Base class for all converters of SessionModel to/from json object.
virtual ~JsonModelConverterInterface()=default
virtual void from_json(const QJsonObject &, SessionModel &) const =0
virtual QJsonObject to_json(const SessionModel &) const =0
Main class to hold hierarchy of SessionItem objects.
Definition: sessionmodel.h:37
materialitems.h Collection of materials to populate MaterialModel.