The class represents settings container. More...
#include <settings.hpp>
Public Types | |
typedef basic_settings_section < CharT > | section |
Section type. More... | |
typedef section::property_tree_type | property_tree_type |
Property tree type. More... | |
typedef CharT | char_type |
Character type. More... | |
typedef std::basic_string < char_type > | string_type |
String type. More... | |
typedef property_tree_type::path_type | path_type |
Property tree path type. More... | |
typedef ref< true > | const_reference |
typedef ref< false > | reference |
typedef iter< true > | const_iterator |
typedef iter< false > | iterator |
typedef std::reverse_iterator < const_iterator > | const_reverse_iterator |
typedef std::reverse_iterator < iterator > | reverse_iterator |
Public Member Functions | |
basic_settings () | |
Default constructor. More... | |
basic_settings (basic_settings const &that) | |
Copy constructor. More... | |
basic_settings (BOOST_RV_REF(this_type) that) | |
Move constructor. More... | |
basic_settings (property_tree_type const &tree) | |
Initializing constructor. More... | |
~basic_settings () | |
Destructor. More... | |
basic_settings & | operator= (BOOST_COPY_ASSIGN_REF(basic_settings) that) |
Copy assignment operator. More... | |
basic_settings & | operator= (BOOST_RV_REF(basic_settings) that) |
Move assignment operator. More... | |
bool | operator! () const BOOST_NOEXCEPT |
Checks if the section refers to the container. More... | |
iterator | begin () |
Returns an iterator over the nested subsections and parameters. More... | |
const_iterator | begin () const |
Returns an iterator over the nested subsections and parameters. More... | |
iterator | end () |
Returns an iterator over the nested subsections and parameters. More... | |
const_iterator | end () const |
Returns an iterator over the nested subsections and parameters. More... | |
reverse_iterator | rbegin () |
Returns a reverse iterator over the nested subsections and parameters. More... | |
const_reverse_iterator | rbegin () const |
Returns a reverse iterator over the nested subsections and parameters. More... | |
reverse_iterator | rend () |
Returns a reverse iterator over the nested subsections and parameters. More... | |
const_reverse_iterator | rend () const |
Returns a reverse iterator over the nested subsections and parameters. More... | |
bool | empty () const |
Checks if the container is empty (i.e. More... | |
reference | operator[] (std::string const §ion_name) |
Accessor to a single parameter. More... | |
const_reference | operator[] (std::string const §ion_name) const |
Accessor to a single parameter. More... | |
reference | operator[] (const char *section_name) |
Accessor to a single parameter. More... | |
const_reference | operator[] (const char *section_name) const |
Accessor to a single parameter. More... | |
property_tree_type const & | property_tree () const |
Accessor for the embedded property tree. More... | |
property_tree_type & | property_tree () |
Accessor for the embedded property tree. More... | |
bool | has_section (string_type const §ion_name) const |
Checks if the specified section is present in the container. More... | |
bool | has_parameter (string_type const §ion_name, string_type const ¶m_name) const |
Checks if the specified parameter is present in the container. More... | |
void | swap (basic_settings_section &that) |
Swaps two references to settings sections. More... | |
Protected Attributes | |
property_tree_type * | m_ptree |
Parameters. More... | |
The class represents settings container.
All settings are presented as a number of named parameters divided into named sections. The parameters values are stored as strings. Individual parameters may be queried via subscript operators, like this:
optional< string > param = settings["Section1"]["Param1"]; // reads parameter "Param1" in section "Section1" // returns an empty value if no such parameter exists settings["Section2"]["Param2"] = 10; // sets the parameter "Param2" in section "Section2" // to value "10"
There are also other methods to work with parameters.
|
inherited |
Character type.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Property tree path type.
typedef section::property_tree_type boost::basic_settings< CharT >::property_tree_type |
Property tree type.
|
inherited |
|
inherited |
typedef basic_settings_section< CharT > boost::basic_settings< CharT >::section |
Section type.
|
inherited |
String type.
|
inline |
Default constructor.
Creates an empty settings container.
|
inline |
Copy constructor.
|
inline |
Move constructor.
References boost::basic_settings_section< CharT >::swap().
|
inlineexplicit |
Initializing constructor.
Creates a settings container with the copy of the specified property tree.
|
inline |
Destructor.
References boost::basic_settings_section< CharT >::m_ptree.
|
inlineinherited |
Returns an iterator over the nested subsections and parameters.
References boost::property_tree::basic_ptree< Key, Data, KeyCompare >::begin().
Referenced by boost::basic_settings_section< CharT >::rbegin().
|
inlineinherited |
Returns an iterator over the nested subsections and parameters.
References boost::property_tree::basic_ptree< Key, Data, KeyCompare >::begin().
|
inlineinherited |
Checks if the container is empty (i.e.
contains no sections and parameters).
References boost::property_tree::basic_ptree< Key, Data, KeyCompare >::empty().
|
inlineinherited |
Returns an iterator over the nested subsections and parameters.
References boost::property_tree::basic_ptree< Key, Data, KeyCompare >::end().
Referenced by boost::basic_settings_section< CharT >::rend().
|
inlineinherited |
Returns an iterator over the nested subsections and parameters.
References boost::property_tree::basic_ptree< Key, Data, KeyCompare >::end().
|
inlineinherited |
Checks if the specified parameter is present in the container.
section_name | The name of the section in which the parameter resides |
param_name | The name of the parameter |
References boost::property_tree::basic_ptree< Key, Data, KeyCompare >::get_child_optional().
|
inlineinherited |
Checks if the specified section is present in the container.
section_name | The name of the section |
References boost::property_tree::basic_ptree< Key, Data, KeyCompare >::get_child_optional().
|
inlineinherited |
Checks if the section refers to the container.
Checks if the section refers to the container.
References boost::basic_settings_section< CharT >::m_ptree.
|
inline |
Copy assignment operator.
References boost::basic_settings_section< CharT >::swap().
|
inline |
Move assignment operator.
References boost::basic_settings_section< CharT >::swap().
|
inlineinherited |
Accessor to a single parameter.
This operator should be used in conjunction with the subsequent subscript operator that designates the parameter name.
section_name | The name of the section in which the parameter resides |
|
inlineinherited |
Accessor to a single parameter.
This operator should be used in conjunction with the subsequent subscript operator that designates the parameter name.
section_name | The name of the section in which the parameter resides |
|
inlineinherited |
Accessor to a single parameter.
This operator should be used in conjunction with the subsequent subscript operator that designates the parameter name.
section_name | The name of the section in which the parameter resides |
|
inlineinherited |
Accessor to a single parameter.
This operator should be used in conjunction with the subsequent subscript operator that designates the parameter name.
section_name | The name of the section in which the parameter resides |
|
inlineinherited |
Accessor for the embedded property tree.
References boost::basic_settings_section< CharT >::m_ptree.
|
inlineinherited |
Accessor for the embedded property tree.
References boost::basic_settings_section< CharT >::m_ptree.
|
inlineinherited |
Returns a reverse iterator over the nested subsections and parameters.
References boost::basic_settings_section< CharT >::begin().
|
inlineinherited |
Returns a reverse iterator over the nested subsections and parameters.
References boost::basic_settings_section< CharT >::begin().
|
inlineinherited |
Returns a reverse iterator over the nested subsections and parameters.
References boost::basic_settings_section< CharT >::end().
|
inlineinherited |
Returns a reverse iterator over the nested subsections and parameters.
References boost::basic_settings_section< CharT >::end().
|
inlineinherited |
Swaps two references to settings sections.
References boost::basic_settings_section< CharT >::m_ptree, and boost::multiprecision::backends::p.
Referenced by boost::basic_settings< CharT >::basic_settings(), boost::basic_settings< CharT >::operator=(), and boost::swap().
|
protectedinherited |