BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ParameterPattern.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Param/Varia/ParameterPattern.h
6 //! @brief Defines class ParameterPattern
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_PARAMETRIZATION_PARAMETERPATTERN_H
16 #define BORNAGAIN_CORE_PARAMETRIZATION_PARAMETERPATTERN_H
17 
18 #include <string>
19 
20 //! Helper class for constructing parameter patterns.
21 //! @ingroup tools_internal
22 
24 {
25 public:
27  ParameterPattern(std::string root_object) : m_pattern("/" + root_object) {}
28 
29  ParameterPattern& beginsWith(std::string start_type);
30  ParameterPattern& add(std::string object_type);
31 
32  std::string toStdString() const { return m_pattern; }
33 
34 private:
35  std::string m_pattern;
36 };
37 
38 #endif // BORNAGAIN_CORE_PARAMETRIZATION_PARAMETERPATTERN_H
Helper class for constructing parameter patterns.
std::string m_pattern
ParameterPattern(std::string root_object)
ParameterPattern & beginsWith(std::string start_type)
std::string toStdString() const
ParameterPattern & add(std::string object_type)