BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
jsonitemcopystrategy.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/jsonitemcopystrategy.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_JSONITEMCOPYSTRATEGY_H
16 #define BORNAGAIN_MVVM_MODEL_MVVM_SERIALIZATION_JSONITEMCOPYSTRATEGY_H
17 
19 #include <memory>
20 
21 namespace ModelView {
22 
23 class SessionItem;
24 class ItemFactoryInterface;
25 
26 //! Provide SessionItem copying using json based strategy.
27 
28 class MVVM_MODEL_EXPORT JsonItemCopyStrategy : public ItemCopyStrategy {
29 public:
30  JsonItemCopyStrategy(const ItemFactoryInterface* item_factory);
32 
33  std::unique_ptr<SessionItem> createCopy(const SessionItem* item) const;
34 
35 private:
37  std::unique_ptr<JsonItemCopyStrategyImpl> p_impl;
38 };
39 
40 } // namespace ModelView
41 
42 #endif // BORNAGAIN_MVVM_MODEL_MVVM_SERIALIZATION_JSONITEMCOPYSTRATEGY_H
Interface for deep item copying.
Interface class for all factories capable of producing SessionItem's.
Provide SessionItem copying using json based strategy.
std::unique_ptr< JsonItemCopyStrategyImpl > p_impl
The main object representing an editable/displayable/serializable entity.
Definition: sessionitem.h:38
Defines class CLASS?
materialitems.h Collection of materials to populate MaterialModel.