...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::log::basic_settings_section — The class represents a reference to the settings container section.
// In header: <boost/log/utility/setup/settings.hpp> template<typename CharT> class basic_settings_section { public: // types typedef CharT char_type; // Character type. typedef std::basic_string< char_type > string_type; // String type. typedef property_tree::basic_ptree< std::string, string_type > property_tree_type; // Property tree type. typedef property_tree_type::path_type path_type; // Property tree path type. typedef implementation_defined const_reference; typedef implementation_defined reference; typedef implementation_defined const_iterator; typedef implementation_defined iterator; // construct/copy/destruct basic_settings_section(); basic_settings_section(basic_settings_section const &); explicit basic_settings_section(property_tree_type *); // public member functions explicit operator bool() const noexcept; bool operator!() const noexcept; iterator begin(); iterator end(); const_iterator begin() const; const_iterator end() const; reverse_iterator rbegin(); reverse_iterator rend(); const_reverse_iterator rbegin() const; const_reverse_iterator rend() const; bool empty() const; reference operator[](std::string const &); const_reference operator[](std::string const &) const; reference operator[](const char *); const_reference operator[](const char *) const; property_tree_type const & property_tree() const; property_tree_type & property_tree(); bool has_section(string_type const &) const; bool has_parameter(string_type const &, string_type const &) const; void swap(basic_settings_section &); };
The section refers to a sub-tree of the library settings container. It does not own the referred sub-tree but allows for convenient access to parameters within the subsection.
basic_settings_section
public
typestypedef implementation_defined const_reference;
Constant reference to the parameter value
typedef implementation_defined reference;
Mutable reference to the parameter value
typedef implementation_defined const_iterator;
Constant iterator over nested parameters and subsections
typedef implementation_defined iterator;
Mutable iterator over nested parameters and subsections
basic_settings_section
public
construct/copy/destructbasic_settings_section();
Default constructor. Creates an empty settings container.
basic_settings_section(basic_settings_section const & that);
Copy constructor.
explicit basic_settings_section(property_tree_type * tree);
basic_settings_section
public member functionsexplicit operator bool() const noexcept;
Checks if the section refers to the container.
bool operator!() const noexcept;
Checks if the section refers to the container.
iterator begin();
Returns an iterator over the nested subsections and parameters.
iterator end();
Returns an iterator over the nested subsections and parameters.
const_iterator begin() const;
Returns an iterator over the nested subsections and parameters.
const_iterator end() const;
Returns an iterator over the nested subsections and parameters.
reverse_iterator rbegin();
Returns a reverse iterator over the nested subsections and parameters.
reverse_iterator rend();
Returns a reverse iterator over the nested subsections and parameters.
const_reverse_iterator rbegin() const;
Returns a reverse iterator over the nested subsections and parameters.
const_reverse_iterator rend() const;
Returns a reverse iterator over the nested subsections and parameters.
bool empty() const;
Checks if the container is empty (i.e. contains no sections and parameters).
reference operator[](std::string const & section_name);
Accessor to a single parameter. This operator should be used in conjunction with the subsequent subscript operator that designates the parameter name.
Parameters: |
|
||
Returns: |
An unspecified reference type that can be used for parameter name specifying |
const_reference operator[](std::string const & section_name) const;
Accessor to a single parameter. This operator should be used in conjunction with the subsequent subscript operator that designates the parameter name.
Parameters: |
|
||
Returns: |
An unspecified reference type that can be used for parameter name specifying |
reference operator[](const char * section_name);
Accessor to a single parameter. This operator should be used in conjunction with the subsequent subscript operator that designates the parameter name.
Parameters: |
|
||
Returns: |
An unspecified reference type that can be used for parameter name specifying |
const_reference operator[](const char * section_name) const;
Accessor to a single parameter. This operator should be used in conjunction with the subsequent subscript operator that designates the parameter name.
Parameters: |
|
||
Returns: |
An unspecified reference type that can be used for parameter name specifying |
property_tree_type const & property_tree() const;
Accessor for the embedded property tree
property_tree_type & property_tree();
Accessor for the embedded property tree
bool has_section(string_type const & section_name) const;
Checks if the specified section is present in the container.
Parameters: |
|
bool has_parameter(string_type const & section_name, string_type const & param_name) const;
Checks if the specified parameter is present in the container.
Parameters: |
|
void swap(basic_settings_section & that);
Swaps two references to settings sections.