![]() |
boost::log::basic_settings — The class represents settings container.
// In header: <boost/log/utility/setup/settings.hpp> template<typename CharT> class basic_settings : public boost::log::basic_settings_section< CharT > { public: // types typedef basic_settings_section< CharT > section; // Section type. typedef section::property_tree_type property_tree_type; // Property tree type. // construct/copy/destruct basic_settings(); basic_settings(basic_settings const &); basic_settings(this_type &&); explicit basic_settings(property_tree_type const &); basic_settings & operator=(basic_settings const &); basic_settings & operator=(basic_settings &&); ~basic_settings(); };
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.
basic_settings
public
construct/copy/destructbasic_settings();
Default constructor. Creates an empty settings container.
basic_settings(basic_settings const & that);
Copy constructor.
basic_settings(this_type && that);
Move constructor.
explicit basic_settings(property_tree_type const & tree);
Initializing constructor. Creates a settings container with the copy of the specified property tree.
basic_settings & operator=(basic_settings const & that);
Copy assignment operator.
basic_settings & operator=(basic_settings && that);
Move assignment operator.
~basic_settings();
Destructor