#include <utilmm/configfile/configset.hh>

Public Types | |
| typedef std::list < const config_set * > | subsets |
Public Member Functions | |
| config_set (config_set *parent=0) | |
| ~config_set () | |
| bool | empty () const |
| bool | exists (const std::string &attribute) const |
| const config_set * | parent () const |
| config_set * | parent () |
| std::list< const config_set * > | children (const std::string &name) const |
| config_set const & | child (std::string const &name) 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 |
| void | set (std::string const &name, std::string const &value) |
| void | set (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, std::list< std::string > const &value) |
| void | insert (std::string const &name, config_set const *value) |
| void | erase (std::string const &name) |
| 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 |
Protected Types | |
| typedef std::multimap < std::string, std::string > | ValueMap |
| typedef std::multimap < std::string, const config_set * > | ChildMap |
Protected Member Functions | |
| void | clear () |
Protected Attributes | |
| config_set * | m_parent |
| ValueMap | m_values |
| ChildMap | m_children |
Friends | |
| class | ConfigFile |
typedef std::multimap<std::string, std::string> utilmm::config_set::ValueMap [protected] |
typedef std::multimap<std::string, const config_set*> utilmm::config_set::ChildMap [protected] |
| typedef std::list<const config_set*> utilmm::config_set::subsets |
| utilmm::config_set::config_set | ( | config_set * | parent = 0 |
) | [explicit] |
| utilmm::config_set::~config_set | ( | ) |
| void utilmm::config_set::clear | ( | ) | [protected] |
Clears this set
| bool utilmm::config_set::empty | ( | ) | const |
Checks if this set is empty (no child, no attributes)
| bool utilmm::config_set::exists | ( | const std::string & | attribute | ) | const |
Tests for the existence of an attribute
| const config_set* utilmm::config_set::parent | ( | ) | const |
The parent config_set object
| config_set* utilmm::config_set::parent | ( | ) |
| std::list<const config_set*> utilmm::config_set::children | ( | const std::string & | name | ) | const |
Get the list of children named name
| config_set const& utilmm::config_set::child | ( | std::string const & | name | ) | const |
Get the first child named name or an empty set
| 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] |
Get a list of values from this config_set
Define accessors for lists
| 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] |
Get a value from this config_set. If there is more than one value for this key, then the first one is returned
Define accessor for scalars
| void utilmm::config_set::set | ( | std::string const & | name, | |
| std::string const & | value | |||
| ) |
Set the value for this key
| void utilmm::config_set::set | ( | std::string const & | name, | |
| std::list< std::string > const & | value | |||
| ) |
Sets multiple values for this key
| void utilmm::config_set::insert | ( | std::string const & | name, | |
| std::string const & | value | |||
| ) |
Insert a value in this config_set
| void utilmm::config_set::insert | ( | std::string const & | name, | |
| std::list< std::string > const & | value | |||
| ) |
Inserts multiple values in this config_set
| void utilmm::config_set::insert | ( | std::string const & | name, | |
| config_set const * | value | |||
| ) |
Add a child to this config_set
| void utilmm::config_set::erase | ( | std::string const & | name | ) |
Remove the given option
| 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] |
Define the basic access function: list of strings. Everything is derived from this one and from the convert<> functions
friend class ConfigFile [friend] |
config_set* utilmm::config_set::m_parent [protected] |
ValueMap utilmm::config_set::m_values [protected] |
ChildMap utilmm::config_set::m_children [protected] |
1.5.3