BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
LayersWithAbsorptionBuilder.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/StandardSamples/LayersWithAbsorptionBuilder.h
6 //! @brief Defines class LayersWithAbsorptionBuilder.
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_CORE_STANDARDSAMPLES_LAYERSWITHABSORPTIONBUILDER_H
16 #define BORNAGAIN_CORE_STANDARDSAMPLES_LAYERSWITHABSORPTIONBUILDER_H
17 
19 #include <memory>
20 
21 class IFormFactor;
22 
23 //! The LayersWithAbsorptionBuilder class generates a multilayer with 3 layers with
24 //! absorption (refractive index has imaginary part).
25 //! @ingroup standard_samples
26 
27 //! The middle layer is populated with particles.
28 //! Requires IComponentService which generates form factors, used for bulk form factors testing.
29 
31 {
32 public:
35  virtual MultiLayer* buildSample() const;
36 
37  MultiLayer* createSampleByIndex(size_t index);
38  size_t size();
39 
40 private:
41  std::unique_ptr<IFormFactor> m_ff;
42 };
43 
44 #endif // BORNAGAIN_CORE_STANDARDSAMPLES_LAYERSWITHABSORPTIONBUILDER_H
Defines pure virtual base class ISampleBuilder.
Pure virtual base class for all form factors.
Definition: IFormFactor.h:40
Interface to the class capable to build samples to simulate.
The LayersWithAbsorptionBuilder class generates a multilayer with 3 layers with absorption (refractiv...
virtual MultiLayer * buildSample() const
std::unique_ptr< IFormFactor > m_ff
MultiLayer * createSampleByIndex(size_t index)
Our sample model: a stack of layers one below the other.
Definition: MultiLayer.h:42