BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Stores multi option (int,double,string) in a container. More...
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 (const OptionContainer &other) | |
Returns true if option with such name already exists. | |
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) |
Sets the value of option. Option should hold same value type already. | |
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.