#include <configset.hh>

Public Types | |
| typedef std::list< const config_set * > | subsets |
| typedef std::list< const config_set * > | subsets |
Public Member Functions | |
| config_set const & | child (std::string const &name) const |
| config_set const & | child (std::string const &name) const |
| std::list< const config_set * > | children (const std::string &name) const |
| std::list< const config_set * > | children (const std::string &name) const |
| config_set (config_set *parent=0) | |
| config_set (config_set *parent=0) | |
| bool | empty () const |
| bool | empty () const |
| void | erase (std::string const &name) |
| void | erase (std::string const &name) |
| bool | exists (const std::string &attribute) const |
| bool | exists (const std::string &attribute) const |
| template<> | |
| config_set::stringlist | get (std::string const &name, config_set::stringlist const &defval, boost::enable_if< details::is_list< config_set::stringlist > >::type *enabler) const |
| template<typename T > | |
| T | get (std::string const &name, T const &defval=T(), typename boost::disable_if< details::is_list< T > >::type *enabler=0) const |
| template<typename T > | |
| T | get (std::string const &name, T const &defval=T(), typename boost::enable_if< details::is_list< T > >::type *enabler=0) const |
| template<typename T > | |
| T | get (std::string const &name, T const &defval=T(), typename boost::disable_if< details::is_list< T > >::type *enabler=0) const |
| template<typename T > | |
| T | get (std::string const &name, T const &defval=T(), typename boost::enable_if< details::is_list< T > >::type *enabler=0) const |
| void | insert (std::string const &name, config_set const *value) |
| void | insert (std::string const &name, std::list< std::string > const &value) |
| void | insert (std::string const &name, std::string const &value) |
| void | insert (std::string const &name, config_set const *value) |
| void | insert (std::string const &name, std::list< std::string > const &value) |
| void | insert (std::string const &name, std::string const &value) |
| config_set * | parent () |
| const config_set * | parent () const |
| config_set * | parent () |
| const config_set * | parent () const |
| void | set (std::string const &name, std::list< std::string > const &value) |
| void | set (std::string const &name, std::string const &value) |
| void | set (std::string const &name, std::list< std::string > const &value) |
| void | set (std::string const &name, std::string const &value) |
| ~config_set () | |
| ~config_set () | |
Protected Types | |
| typedef std::multimap < std::string, const config_set * > | ChildMap |
| typedef std::multimap < std::string, const config_set * > | ChildMap |
| typedef std::multimap < std::string, std::string > | ValueMap |
| typedef std::multimap < std::string, std::string > | ValueMap |
Protected Member Functions | |
| void | clear () |
| void | clear () |
Protected Attributes | |
| ChildMap | m_children |
| config_set * | m_parent |
| ValueMap | m_values |
Private Types | |
| typedef std::list< std::string > | stringlist |
| typedef std::list< std::string > | stringlist |
Static Private Member Functions | |
| template<typename T > | |
| static T | convert (std::string const &value) |
| template<typename T > | |
| static T | convert (std::string const &value) |
Friends | |
| class | ConfigFile |
A scope in configuration files
Definition at line 24 of file install/include/utilmm/configfile/configset.hh.
typedef std::multimap<std::string, const config_set*> utilmm::config_set::ChildMap [protected] |
Definition at line 38 of file utilmm/configfile/configset.hh.
typedef std::multimap<std::string, const config_set*> utilmm::config_set::ChildMap [protected] |
Definition at line 38 of file install/include/utilmm/configfile/configset.hh.
typedef std::list<std::string> utilmm::config_set::stringlist [private] |
Definition at line 30 of file utilmm/configfile/configset.hh.
typedef std::list<std::string> utilmm::config_set::stringlist [private] |
Definition at line 30 of file install/include/utilmm/configfile/configset.hh.
| typedef std::list<const config_set*> utilmm::config_set::subsets |
Definition at line 49 of file utilmm/configfile/configset.hh.
| typedef std::list<const config_set*> utilmm::config_set::subsets |
Definition at line 49 of file install/include/utilmm/configfile/configset.hh.
typedef std::multimap<std::string, std::string> utilmm::config_set::ValueMap [protected] |
Definition at line 36 of file utilmm/configfile/configset.hh.
typedef std::multimap<std::string, std::string> utilmm::config_set::ValueMap [protected] |
Definition at line 36 of file install/include/utilmm/configfile/configset.hh.
| config_set::config_set | ( | config_set * | parent = 0 |
) | [explicit] |
Definition at line 7 of file configset.cc.
| config_set::~config_set | ( | ) |
Definition at line 10 of file configset.cc.
| utilmm::config_set::config_set | ( | config_set * | parent = 0 |
) | [explicit] |
| utilmm::config_set::~config_set | ( | ) |
| config_set const& utilmm::config_set::child | ( | std::string const & | name | ) | const |
Get the first child named name or an empty set
| config_set const & config_set::child | ( | std::string const & | name | ) | const |
Get the first child named name or an empty set
Definition at line 48 of file configset.cc.
| std::list<const config_set*> utilmm::config_set::children | ( | const std::string & | name | ) | const |
Get the list of children named name
| list< const config_set * > config_set::children | ( | const std::string & | name | ) | const |
Get the list of children named name
Definition at line 30 of file configset.cc.
| void utilmm::config_set::clear | ( | ) | [protected] |
Clears this set
| void config_set::clear | ( | ) | [protected] |
Clears this set
Definition at line 17 of file configset.cc.
| static T utilmm::config_set::convert | ( | std::string const & | value | ) | [inline, static, private] |
| T utilmm::config_set::convert | ( | std::string const & | value | ) | [inline, static, private] |
Definition at line 113 of file install/include/utilmm/configfile/configset.hh.
| bool utilmm::config_set::empty | ( | ) | const |
Checks if this set is empty (no child, no attributes)
| bool config_set::empty | ( | ) | const |
Checks if this set is empty (no child, no attributes)
Definition at line 15 of file configset.cc.
| void utilmm::config_set::erase | ( | std::string const & | name | ) |
Remove the given option
| void config_set::erase | ( | std::string const & | name | ) |
Remove the given option
Definition at line 84 of file configset.cc.
| bool utilmm::config_set::exists | ( | const std::string & | attribute | ) | const |
Tests for the existence of an attribute
| bool config_set::exists | ( | const std::string & | attribute | ) | const |
Tests for the existence of an attribute
Definition at line 57 of file configset.cc.
| config_set::stringlist utilmm::config_set::get | ( | std::string const & | name, | |
| config_set::stringlist const & | defval, | |||
| boost::enable_if< details::is_list< config_set::stringlist > >::type * | enabler | |||
| ) | const [inline] |
Definition at line 100 of file configset.cc.
| T utilmm::config_set::get | ( | std::string const & | name, | |
| T const & | defval = T(), |
|||
| typename boost::disable_if< details::is_list< T > >::type * | enabler = 0 | |||
| ) | const [inline] |
In a config_set object, all values are stored as lists of strings. This method is a convenience method when only one value is stored for a given key. It converts the stored value into the required type using the associated config_set::convert template specialization (if it exists).
If no value is associated with the key, returns defval
| T utilmm::config_set::get | ( | std::string const & | name, | |
| T const & | defval = T(), |
|||
| typename boost::enable_if< details::is_list< T > >::type * | enabler = 0 | |||
| ) | const [inline] |
In a config_set object, all values are stored as lists of strings. This method converts the stored value into the required type using the associated config_set::convert template specialization (if it exists).
If no value is stored under the given key, returns defval
| T utilmm::config_set::get | ( | std::string const & | name, | |
| T const & | defval = T(), |
|||
| typename boost::disable_if< details::is_list< T > >::type * | enabler = 0 | |||
| ) | const [inline] |
In a config_set object, all values are stored as lists of strings. This method is a convenience method when only one value is stored for a given key. It converts the stored value into the required type using the associated config_set::convert template specialization (if it exists).
If no value is associated with the key, returns defval
Definition at line 138 of file install/include/utilmm/configfile/configset.hh.
| T utilmm::config_set::get | ( | std::string const & | name, | |
| T const & | defval = T(), |
|||
| typename boost::enable_if< details::is_list< T > >::type * | enabler = 0 | |||
| ) | const [inline] |
In a config_set object, all values are stored as lists of strings. This method converts the stored value into the required type using the associated config_set::convert template specialization (if it exists).
If no value is stored under the given key, returns defval
Definition at line 123 of file install/include/utilmm/configfile/configset.hh.
| void utilmm::config_set::insert | ( | std::string const & | name, | |
| config_set const * | value | |||
| ) |
Add a child to this config_set
| void utilmm::config_set::insert | ( | std::string const & | name, | |
| std::list< std::string > const & | value | |||
| ) |
Appends the given values to the valus already associated with name
| void utilmm::config_set::insert | ( | std::string const & | name, | |
| std::string const & | value | |||
| ) |
Appends the given value to the values already associated with name
| void config_set::insert | ( | std::string const & | name, | |
| config_set const * | value | |||
| ) |
Add a child to this config_set
Definition at line 72 of file configset.cc.
| void config_set::insert | ( | std::string const & | name, | |
| std::list< std::string > const & | value | |||
| ) |
Appends the given values to the valus already associated with name
Definition at line 66 of file configset.cc.
| void config_set::insert | ( | std::string const & | name, | |
| std::string const & | value | |||
| ) |
Appends the given value to the values already associated with name
Definition at line 64 of file configset.cc.
| config_set* utilmm::config_set::parent | ( | ) |
| const config_set* utilmm::config_set::parent | ( | ) | const |
The parent config_set object
| config_set * config_set::parent | ( | ) |
Definition at line 29 of file configset.cc.
| const config_set * config_set::parent | ( | ) | const |
The parent config_set object
Definition at line 28 of file configset.cc.
| void utilmm::config_set::set | ( | std::string const & | name, | |
| std::list< std::string > const & | value | |||
| ) |
Sets multiple values for this key. If some value was already associated with name, the new value replaces it. See insert to append new values to already existing ones.
| void utilmm::config_set::set | ( | std::string const & | name, | |
| std::string const & | value | |||
| ) |
Replaces any value associated with name with the value provided. See insert to append new values to already existing ones
| void config_set::set | ( | std::string const & | name, | |
| std::list< std::string > const & | value | |||
| ) |
Sets multiple values for this key. If some value was already associated with name, the new value replaces it. See insert to append new values to already existing ones.
Definition at line 79 of file configset.cc.
| void config_set::set | ( | std::string const & | name, | |
| std::string const & | value | |||
| ) |
Replaces any value associated with name with the value provided. See insert to append new values to already existing ones
Definition at line 74 of file configset.cc.
ConfigFile [friend] |
Definition at line 27 of file install/include/utilmm/configfile/configset.hh.
ChildMap utilmm::config_set::m_children [protected] |
Definition at line 39 of file install/include/utilmm/configfile/configset.hh.
config_set * utilmm::config_set::m_parent [protected] |
Definition at line 35 of file install/include/utilmm/configfile/configset.hh.
ValueMap utilmm::config_set::m_values [protected] |
Definition at line 37 of file install/include/utilmm/configfile/configset.hh.