BornAgain  1.19.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 reflection and scattering
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 #ifdef SWIG
16 #error no need to expose this header to Swig
17 #endif
18 
19 #ifndef USER_API
20 #ifndef BORNAGAIN_SAMPLE_STANDARDSAMPLES_LAYERSWITHABSORPTIONBUILDER_H
21 #define BORNAGAIN_SAMPLE_STANDARDSAMPLES_LAYERSWITHABSORPTIONBUILDER_H
22 
24 #include <memory>
25 
26 class IFormFactor;
27 
28 //! The LayersWithAbsorptionBuilder class generates a multilayer with 3 layers with
29 //! absorption (refractive index has imaginary part).
30 //!
31 //! The middle layer is populated with particles.
32 //! @ingroup standard_samples
33 
35 public:
38  virtual MultiLayer* buildSample() const;
39 
40  MultiLayer* createSampleByIndex(size_t index);
41  size_t size();
42 
43 private:
44  std::unique_ptr<IFormFactor> m_ff;
45 };
46 
47 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_LAYERSWITHABSORPTIONBUILDER_H
48 #endif // USER_API
Defines interface ISampleBuilder.
Abstract base class for all form factors.
Definition: IFormFactor.h:36
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:41