BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
IBackground.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sim/Background/IBackground.h
6 //! @brief Defines interface IBackground.
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_SIM_BACKGROUND_IBACKGROUND_H
16 #define BORNAGAIN_SIM_BACKGROUND_IBACKGROUND_H
17 
18 #include "Base/Types/ICloneable.h"
19 #include "Param/Node/INode.h"
20 
21 //! Abstract base class for background noise, to be added to simulated scattering.
22 //!
23 //! Base class of ConstantBackground, PoissonBackground.
24 //! @ingroup background
25 
26 
27 class IBackground : public ICloneable, public INode {
28 public:
29  IBackground(const std::vector<double>& PValues);
30  ~IBackground() override;
31  IBackground* clone() const override = 0;
32 
33  virtual double addBackground(double element) const = 0;
34 };
35 
36 #endif // BORNAGAIN_SIM_BACKGROUND_IBACKGROUND_H
Defines and implements the standard mix-in ICloneable.
Defines interface INode.
Abstract base class for background noise, to be added to simulated scattering.
Definition: IBackground.h:27
IBackground * clone() const override=0
~IBackground() override
IBackground(const std::vector< double > &PValues)
Definition: IBackground.cpp:17
virtual double addBackground(double element) const =0
Interface for polymorphic classes that should not be copied, except by explicit cloning.
Definition: ICloneable.h:23
Base class for tree-like structures containing parameterized objects.
Definition: INode.h:40