BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Public Types | |
using | option_t = std::shared_ptr< MultiOption > |
using | container_t = std::vector< option_t > |
using | iterator = container_t::iterator |
using | const_iterator = container_t::const_iterator |
Public Member Functions | |
OptionContainer () | |
OptionContainer (const OptionContainer &other) | |
OptionContainer & | operator= (const OptionContainer &other) |
template<class T > | |
option_t | addOption (const std::string &optionName, T value, const std::string &description="") |
option_t | option (const std::string &optionName) |
const option_t | option (const std::string &optionName) const |
template<class T > | |
T | optionValue (const std::string &optionName) const |
template<class T > | |
void | setOptionValue (const std::string &optionName, T value) |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
size_t | size () const |
bool | empty () const |
Protected Member Functions | |
bool | exists (const std::string &name) |
void | swapContent (OptionContainer &other) |
Protected Attributes | |
container_t | m_options |
Stores multi option (int,double,string) in a container.
Definition at line 27 of file OptionContainer.h.
using OptionContainer::option_t = std::shared_ptr<MultiOption> |
Definition at line 30 of file OptionContainer.h.
using OptionContainer::container_t = std::vector<option_t> |
Definition at line 31 of file OptionContainer.h.
using OptionContainer::iterator = container_t::iterator |
Definition at line 32 of file OptionContainer.h.
using OptionContainer::const_iterator = container_t::const_iterator |
Definition at line 33 of file OptionContainer.h.
|
inline |
Definition at line 35 of file OptionContainer.h.
OptionContainer::OptionContainer | ( | const OptionContainer & | other | ) |
Returns true if option with such name already exists.
Definition at line 19 of file OptionContainer.cpp.
References m_options, and option().
OptionContainer & OptionContainer::operator= | ( | const OptionContainer & | other | ) |
Definition at line 25 of file OptionContainer.cpp.
References swapContent().
OptionContainer::option_t OptionContainer::addOption | ( | const std::string & | optionName, |
T | value, | ||
const std::string & | description = "" |
||
) |
Definition at line 66 of file OptionContainer.h.
References exists(), and m_options.
Referenced by RootMinimizerAdapter::addOption().
OptionContainer::option_t OptionContainer::option | ( | const std::string & | optionName | ) |
Definition at line 34 of file OptionContainer.cpp.
References m_options.
Referenced by exists(), option(), OptionContainer(), optionValue(), MinimizerOptions::processCommand(), setOptionValue(), and MinimizerOptions::toOptionString().
const OptionContainer::option_t OptionContainer::option | ( | const std::string & | optionName | ) | const |
Definition at line 45 of file OptionContainer.cpp.
References m_options, and option().
T OptionContainer::optionValue | ( | const std::string & | optionName | ) | const |
Definition at line 78 of file OptionContainer.h.
References option().
Referenced by RootMinimizerAdapter::optionValue().
void OptionContainer::setOptionValue | ( | const std::string & | optionName, |
T | value | ||
) |
Sets the value of option. Option should hold same value type already.
Definition at line 83 of file OptionContainer.h.
References option().
Referenced by RootMinimizerAdapter::setOptionValue().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 57 of file OptionContainer.h.
References size().
Referenced by anonymous_namespace{MinimizerResultUtils.cpp}::reportOption().
|
protected |
Definition at line 56 of file OptionContainer.cpp.
References m_options, and option().
Referenced by addOption().
|
protected |
Definition at line 65 of file OptionContainer.cpp.
References m_options, and swap().
Referenced by operator=().
|
protected |
Definition at line 62 of file OptionContainer.h.
Referenced by addOption(), begin(), end(), exists(), option(), OptionContainer(), size(), swapContent(), and MinimizerOptions::toOptionString().