COOLFluiD
Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
|
#include <OptionList.hpp>
Inherited by SignalOptions.
Public Types | |
typedef std::map< std::string, boost::shared_ptr< Option > > | OptionStorage_t |
type to store the options per name More... | |
typedef OptionStorage_t::iterator | iterator |
typedef OptionStorage_t::const_iterator | const_iterator |
Public Member Functions | |
template<typename T > | |
SelectOptionType< T >::type & | add (const std::string &name, const T &default_value=T()) |
template<typename OPTION_TYPE > | |
OPTION_TYPE & | add (const boost::shared_ptr< OPTION_TYPE > &option) |
template<typename TYPE > | |
void | link_to_parameter (const std::string &pname, TYPE *par) |
sets a link to the option More... | |
const Option & | option (const std::string &pname) const |
get a constant option from the list More... | |
Option & | option (const std::string &pname) |
get an option from the list More... | |
const boost::shared_ptr< Option > & | option_ptr (const std::string &pname) |
get a constant option from the list More... | |
const Option & | operator[] (const std::string &pname) const |
contant access operator to properties More... | |
Option & | operator[] (const std::string &pname) |
access operator to properties More... | |
void | set (const std::string &pname, const boost::any &val) |
bool | set_if_exists (const std::string &pname, const boost::any &val) |
template<typename TYPE > | |
const TYPE | value (const std::string &opt_name) const |
Get the value of the option with given name. More... | |
bool | check (const std::string &opt_name) const |
void | erase (const std::string &name) |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
std::string | list_options () const |
list the options as a string More... | |
void | set (const std::string &arg) |
Parses the strings to options. More... | |
void | set (const std::vector< std::string > &args) |
Configure an option on this class from a list of human readable strings. More... | |
Public Attributes | |
OptionStorage_t | store |
storage of options More... | |
Class defines a list of options to be used in the ConfigObject class
Definition at line 26 of file OptionList.hpp.
typedef OptionStorage_t::const_iterator const_iterator |
Definition at line 35 of file OptionList.hpp.
typedef OptionStorage_t::iterator iterator |
Definition at line 34 of file OptionList.hpp.
typedef std::map< std::string , boost::shared_ptr<Option> > OptionStorage_t |
type to store the options per name
Definition at line 32 of file OptionList.hpp.
|
inline |
Create an option and add it to the list
T | Template parameter specifying the type held by the option. |
name | Name of the option |
default_value | Default value for the option |
Definition at line 45 of file OptionList.hpp.
|
inline |
adds an externally created option to the list
Definition at line 60 of file OptionList.hpp.
|
inline |
Definition at line 120 of file OptionList.hpp.
|
inline |
Definition at line 124 of file OptionList.hpp.
|
inline |
check that a option with the name exists
opt_name | the property name |
Definition at line 111 of file OptionList.hpp.
|
inline |
Definition at line 122 of file OptionList.hpp.
|
inline |
Definition at line 126 of file OptionList.hpp.
void erase | ( | const std::string & | name | ) |
erases an option from the list
name | the option name to erase |
Definition at line 78 of file OptionList.cpp.
|
inline |
sets a link to the option
Definition at line 71 of file OptionList.hpp.
std::string list_options | ( | ) | const |
list the options as a string
Definition at line 155 of file OptionList.cpp.
const Option & operator[] | ( | const std::string & | pname | ) | const |
contant access operator to properties
Definition at line 111 of file OptionList.cpp.
Option & operator[] | ( | const std::string & | pname | ) |
access operator to properties
Definition at line 89 of file OptionList.cpp.
const Option & option | ( | const std::string & | pname | ) | const |
get a constant option from the list
Definition at line 52 of file OptionList.cpp.
Option & option | ( | const std::string & | pname | ) |
get an option from the list
Definition at line 71 of file OptionList.cpp.
const boost::shared_ptr< Option > & option_ptr | ( | const std::string & | pname | ) |
get a constant option from the list
Definition at line 32 of file OptionList.cpp.
void set | ( | const std::string & | pname, |
const boost::any & | val | ||
) |
Configure one option, and trigger its actions
[in] | optname | The option name |
[in] | val | The new value assigned to the option |
Definition at line 132 of file OptionList.cpp.
void set | ( | const std::string & | arg | ) |
Parses the strings to options.
If an option already exists in the list, its value is modified with the new one. If it does not exist yet, it is added. Configure an option on this class from a human readable string.
The string provides the configuration in one of the following formats:
Definition at line 228 of file OptionList.cpp.
void set | ( | const std::vector< std::string > & | args | ) |
Configure an option on this class from a list of human readable strings.
The strings provide the configuration in one of the following formats:
Definition at line 315 of file OptionList.cpp.
bool set_if_exists | ( | const std::string & | pname, |
const boost::any & | val | ||
) |
Configure one option, and trigger its actions
[in] | optname | The option name |
[in] | val | The new value assigned to the option |
Definition at line 215 of file OptionList.cpp.
|
inline |
Get the value of the option with given name.
[in] | opt_name | The option name |
Definition at line 104 of file OptionList.hpp.
OptionStorage_t store |
storage of options
Definition at line 153 of file OptionList.hpp.
Send comments to: COOLFluiD Web Admin |