#include <ConfigurationSetting.h>
Public Types | |
| typedef boost::shared_ptr< ConfigurationSetting > | SharedPtr |
| A shared pointer to this type. | |
| typedef boost::shared_ptr< ConfigurationSetting const > | ConstSharedPtr |
| A shared pointer to constant data of this type. | |
| typedef std::map< std::string, std::string > | AttributeList |
| A list of attributes. | |
Public Member Functions | |
| ConfigurationSetting (std::string const &name_, std::string const &value_="", AttributeList const &attributes_=AttributeList()) | |
| template<typename T> | |
| T | getValueAs () const |
| Returns the value as a specific data type. | |
| template<typename T> | |
| void | setValue (T const &newValue) |
| Sets the value of the setting. | |
Public Attributes | |
| std::string const | name |
| The name of the setting. | |
| std::string | value |
| The value of the setting. | |
| AttributeList | attributes |
| The attributes of the setting. | |
The setting consists of a name, a value, and a list of attributes that are associated with it.
| typedef boost::shared_ptr<ConfigurationSetting> PWToolBox::Configuration::ConfigurationSetting::SharedPtr |
A shared pointer to this type.
| typedef boost::shared_ptr<ConfigurationSetting const> PWToolBox::Configuration::ConfigurationSetting::ConstSharedPtr |
A shared pointer to constant data of this type.
| typedef std::map<std::string,std::string> PWToolBox::Configuration::ConfigurationSetting::AttributeList |
A list of attributes.
| PWToolBox::Configuration::ConfigurationSetting::ConfigurationSetting | ( | std::string const & | name_, | |
| std::string const & | value_ = "", |
|||
| AttributeList const & | attributes_ = AttributeList() | |||
| ) | [inline] |
| name_ | The name of the setting | |
| value_ | The value of the setting | |
| attributes_ | The attributes associated with the setting |
| InvalidArgumentException | Thrown if name is empty |
| T PWToolBox::Configuration::ConfigurationSetting::getValueAs | ( | ) | const [inline] |
Returns the value as a specific data type.
The type must be convertable from std::string and it must be copyable.
| IllegalOperationException | Thrown if the setting is not convertable from std::string to the requested type |
| void PWToolBox::Configuration::ConfigurationSetting::setValue | ( | T const & | newValue | ) | [inline] |
Sets the value of the setting.
newValue must be convertable to std::string
| newValue | The new value of the setting |
| IllegalOperationException | Thrown if newValue could not be converted to a std::string |
| std::string const PWToolBox::Configuration::ConfigurationSetting::name |
The name of the setting.
The value of the setting.
The attributes of the setting.
1.5.1