BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
FootprintItems.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/Model/Device/FootprintItems.h
6 //! @brief Declares FootprintItem classes
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 #ifndef BORNAGAIN_GUI_MODEL_DEVICE_FOOTPRINTITEMS_H
16 #define BORNAGAIN_GUI_MODEL_DEVICE_FOOTPRINTITEMS_H
17 
19 #include <memory>
20 
21 class IFootprintFactor;
22 class Streamer;
23 
25 public:
26  virtual ~FootprintItem() = default;
27  virtual void serialize(Streamer&){};
28  virtual std::unique_ptr<IFootprintFactor> createFootprint() const = 0;
29 };
30 
32 public:
33  std::unique_ptr<IFootprintFactor> createFootprint() const override;
34 };
35 
37 public:
38  explicit FootprintGaussianItem(double value = 0.0);
39  void serialize(Streamer& s) override;
40  std::unique_ptr<IFootprintFactor> createFootprint() const override;
41  DOUBLE_PROPERTY(gaussianFootprintValue, GaussianFootprintValue)
42 };
43 
45 public:
46  explicit FootprintSquareItem(double value = 0.0);
47  void serialize(Streamer& s) override;
48  std::unique_ptr<IFootprintFactor> createFootprint() const override;
49  DOUBLE_PROPERTY(squareFootprintValue, SquareFootprintValue)
50 };
51 
52 #endif // BORNAGAIN_GUI_MODEL_DEVICE_FOOTPRINTITEMS_H
Defines class DoubleProperty.
#define DOUBLE_PROPERTY(nameLower, nameUpper)
Add a member, a getter and a setter for a DoubleProperty.
FootprintGaussianItem(double value=0.0)
void serialize(Streamer &s) override
std::unique_ptr< IFootprintFactor > createFootprint() const override
virtual void serialize(Streamer &)
virtual ~FootprintItem()=default
virtual std::unique_ptr< IFootprintFactor > createFootprint() const =0
std::unique_ptr< IFootprintFactor > createFootprint() const override
void serialize(Streamer &s) override
FootprintSquareItem(double value=0.0)
std::unique_ptr< IFootprintFactor > createFootprint() const override
Supports serialization to or deserialization from QXmlStream.
Definition: Streamer.h:36