BornAgain  1.18.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 scattering at grazing incidence
4 //
5 //! @file Sample/SampleBuilderEngine/ISampleBuilder.h
6 //! @brief Defines pure virtual base class 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 BORNAGAIN_CORE_SAMPLEBUILDERENGINE_ISAMPLEBUILDER_H
16 #define BORNAGAIN_CORE_SAMPLEBUILDERENGINE_ISAMPLEBUILDER_H
17 
19 
20 class MultiLayer;
21 
22 //! Interface to the class capable to build samples to simulate.
23 //! @ingroup simulation_internal
24 
26 {
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_CORE_SAMPLEBUILDERENGINE_ISAMPLEBUILDER_H
Defines class IParameterized.
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:42