BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
class implementing generic options for a numerical algorithm Just store the options in a map of string-value pairs
Definition at line 31 of file GenAlgoOptions.h.
Public Member Functions | |
GenAlgoOptions () | |
virtual | ~GenAlgoOptions () |
virtual IOptions * | Clone () const |
virtual bool | GetIntValue (const char *name, int &val) const |
virtual bool | GetNamedValue (const char *name, std::string &val) const |
virtual bool | GetRealValue (const char *name, double &val) const |
template<typename T > | |
bool | GetValue (const char *name, T &t) const |
int | IValue (const char *name) const |
std::string | NamedValue (const char *name) const |
virtual void | Print (std::ostream &os=std::cout) const |
print options More... | |
double | RValue (const char *name) const |
virtual void | SetIntValue (const char *name, int val) |
virtual void | SetNamedValue (const char *name, const char *val) |
virtual void | SetRealValue (const char *name, double val) |
method wich need to be re-implemented by the derived classes More... | |
void | SetValue (const char *name, const char *val) |
void | SetValue (const char *name, double val) |
set option value More... | |
void | SetValue (const char *name, int val) |
Static Public Member Functions | |
static IOptions & | Default (const char *algoname) |
static IOptions * | FindDefault (const char *algoname) |
static void | PrintAllDefault (std::ostream &os=std::cout) |
print all the default options More... | |
Private Member Functions | |
bool | DoGetValue (const char *name, double &val) const |
bool | DoGetValue (const char *name, int &val) const |
bool | DoGetValue (const char *name, std::string &val) const |
Static Private Member Functions | |
template<class M > | |
static const M::mapped_type * | FindValue (const std::string &name, const M &opts) |
template<class M > | |
static void | InsertValue (const std::string &name, M &opts, const typename M::mapped_type &value) |
template<class M > | |
static void | Print (const M &opts, std::ostream &os) |
Private Attributes | |
std::map< std::string, int > | fIntOpts |
std::map< std::string, std::string > | fNamOpts |
std::map< std::string, double > | fRealOpts |
|
inline |
|
inlinevirtual |
Definition at line 37 of file GenAlgoOptions.h.
|
inlinevirtual |
generic methods for retrivieng options
Implements ROOT::Math::IOptions.
Definition at line 46 of file GenAlgoOptions.h.
References GenAlgoOptions().
|
static |
|
inlineprivateinherited |
Definition at line 103 of file IOptions.h.
References ROOT::Math::IOptions::GetRealValue().
Referenced by ROOT::Math::IOptions::GetValue().
|
inlineprivateinherited |
Definition at line 105 of file IOptions.h.
References ROOT::Math::IOptions::GetIntValue().
|
inlineprivateinherited |
Definition at line 107 of file IOptions.h.
References ROOT::Math::IOptions::GetNamedValue().
|
static |
|
inlinestaticprivate |
Definition at line 117 of file GenAlgoOptions.h.
Referenced by GetIntValue(), GetNamedValue(), and GetRealValue().
|
inlinevirtual |
Reimplemented from ROOT::Math::IOptions.
Definition at line 60 of file GenAlgoOptions.h.
References FindValue(), and fIntOpts.
|
inlinevirtual |
Reimplemented from ROOT::Math::IOptions.
Definition at line 67 of file GenAlgoOptions.h.
References FindValue(), and fNamOpts.
|
inlinevirtual |
Reimplemented from ROOT::Math::IOptions.
Definition at line 53 of file GenAlgoOptions.h.
References FindValue(), and fRealOpts.
|
inlineinherited |
Definition at line 73 of file IOptions.h.
References ROOT::Math::IOptions::DoGetValue().
|
inlinestaticprivate |
Definition at line 127 of file GenAlgoOptions.h.
Referenced by SetIntValue(), SetNamedValue(), and SetRealValue().
|
inlineinherited |
Definition at line 56 of file IOptions.h.
References ROOT::Math::IOptions::GetIntValue(), and MATH_ERROR_MSGVAL.
|
inlineinherited |
Definition at line 63 of file IOptions.h.
References ROOT::Math::IOptions::GetNamedValue(), and MATH_ERROR_MSGVAL.
|
inlinestaticprivate |
Definition at line 139 of file GenAlgoOptions.h.
|
inlinevirtual |
print options
Reimplemented from ROOT::Math::IOptions.
Definition at line 89 of file GenAlgoOptions.h.
|
static |
print all the default options
|
inlineinherited |
Definition at line 49 of file IOptions.h.
References ROOT::Math::IOptions::GetRealValue(), and MATH_ERROR_MSGVAL.
|
inlinevirtual |
Reimplemented from ROOT::Math::IOptions.
Definition at line 79 of file GenAlgoOptions.h.
References fIntOpts, and InsertValue().
|
inlinevirtual |
Reimplemented from ROOT::Math::IOptions.
Definition at line 83 of file GenAlgoOptions.h.
References fNamOpts, and InsertValue().
|
inlinevirtual |
method wich need to be re-implemented by the derived classes
Reimplemented from ROOT::Math::IOptions.
Definition at line 75 of file GenAlgoOptions.h.
References fRealOpts, and InsertValue().
|
inlineinherited |
Definition at line 46 of file IOptions.h.
References ROOT::Math::IOptions::SetNamedValue().
|
inlineinherited |
set option value
generic methods for retrivieng options
Definition at line 44 of file IOptions.h.
References ROOT::Math::IOptions::SetRealValue().
|
inlineinherited |
Definition at line 45 of file IOptions.h.
References ROOT::Math::IOptions::SetIntValue().
|
private |
Definition at line 147 of file GenAlgoOptions.h.
Referenced by GetIntValue(), Print(), and SetIntValue().
|
private |
Definition at line 148 of file GenAlgoOptions.h.
Referenced by GetNamedValue(), Print(), and SetNamedValue().
|
private |
Definition at line 146 of file GenAlgoOptions.h.
Referenced by GetRealValue(), Print(), and SetRealValue().