16 #error no need to expose this header to Swig
20 #ifndef BORNAGAIN_FIT_TOOLS_MULTIOPTION_H
21 #define BORNAGAIN_FIT_TOOLS_MULTIOPTION_H
23 #include <boost/variant.hpp>
32 using variant_t = boost::variant<int, double, std::string>;
37 explicit MultiOption(
const std::string&
name,
const T& t,
const std::string& descripion =
"");
39 std::string
name()
const;
48 template <
typename T> T
get()
const;
Stores a single option for minimization algorithm.
T getDefault() const
Returns the option's default value (i.e. used during construction)
MultiOption(const std::string &name="")
void setFromString(const std::string &value)
Sets the value of option from string.
variant_t & defaultValue()
void setDescription(const std::string &description)
variant_t m_default_value
std::string description() const
boost::variant< int, double, std::string > variant_t
T get() const
Returns the option's value.
std::string m_description
QString const & name(EShape k)