BornAgain  1.19.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 reflection and scattering
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 #ifdef SWIG
16 #error no need to expose this header to Swig
17 #endif
18 
19 #ifndef USER_API
20 #ifndef BORNAGAIN_PARAM_VARIA_PARAMETERPATTERN_H
21 #define BORNAGAIN_PARAM_VARIA_PARAMETERPATTERN_H
22 
23 #include <string>
24 
25 //! Helper class for constructing parameter patterns.
26 //! @ingroup tools_internal
27 
29 public:
31  ParameterPattern(std::string root_object) : m_pattern("/" + root_object) {}
32 
33  ParameterPattern& beginsWith(std::string start_type);
34  ParameterPattern& add(std::string object_type);
35 
36  std::string toStdString() const { return m_pattern; }
37 
38 private:
39  std::string m_pattern;
40 };
41 
42 #endif // BORNAGAIN_PARAM_VARIA_PARAMETERPATTERN_H
43 #endif // USER_API
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)