BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
jsonvariantconverterinterface.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/jsonvariantconverterinterface.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_JSONVARIANTCONVERTERINTERFACE_H
16 #define BORNAGAIN_MVVM_MODEL_MVVM_SERIALIZATION_JSONVARIANTCONVERTERINTERFACE_H
17 
18 #include "mvvm/core/variant.h"
19 #include "mvvm/model_export.h"
20 
21 class QJsonObject;
22 
23 namespace ModelView {
24 
25 //! Base class for all supported converters of Variant to/from json object
26 
27 class MVVM_MODEL_EXPORT JsonVariantConverterInterface {
28 public:
29  virtual ~JsonVariantConverterInterface() = default;
30 
31  virtual QJsonObject get_json(const Variant&) = 0;
32 
33  virtual Variant get_variant(const QJsonObject&) = 0;
34 };
35 
36 } // namespace ModelView
37 
38 #endif // BORNAGAIN_MVVM_MODEL_MVVM_SERIALIZATION_JSONVARIANTCONVERTERINTERFACE_H
Base class for all supported converters of Variant to/from json object.
virtual QJsonObject get_json(const Variant &)=0
virtual ~JsonVariantConverterInterface()=default
virtual Variant get_variant(const QJsonObject &)=0
materialitems.h Collection of materials to populate MaterialModel.
Defines class CLASS?
QVariant Variant
Definition: variant.h:23