BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ISampleBuilder.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/SampleBuilderEngine/ISampleBuilder.h
6 //! @brief Defines interface ISampleBuilder.
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 USER_API
16 #ifndef BORNAGAIN_SAMPLE_SAMPLEBUILDERENGINE_ISAMPLEBUILDER_H
17 #define BORNAGAIN_SAMPLE_SAMPLEBUILDERENGINE_ISAMPLEBUILDER_H
18 
20 
21 class MultiLayer;
22 
23 //! Interface to the class capable to build samples to simulate.
24 //! @ingroup simulation_internal
25 
27 public:
29  virtual ~ISampleBuilder();
30 
31  virtual MultiLayer* buildSample() const = 0;
32 
33  virtual MultiLayer* createSampleByIndex(size_t) { return buildSample(); }
34  virtual size_t size() { return 1; }
35 };
36 
37 #endif // BORNAGAIN_SAMPLE_SAMPLEBUILDERENGINE_ISAMPLEBUILDER_H
38 #endif // USER_API
Defines interface IParametricComponent.
Manages a local parameter pool, and a tree of child pools.
Interface to the class capable to build samples to simulate.
virtual size_t size()
virtual MultiLayer * buildSample() const =0
virtual ~ISampleBuilder()
virtual MultiLayer * createSampleByIndex(size_t)
Our sample model: a stack of layers one below the other.
Definition: MultiLayer.h:41