## Class template basic_settings_section

boost::log::basic_settings_section — The class represents a reference to the settings container section.

## Synopsis

    // 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 &);
    };

## Description

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 types

1. typedef implementation_defined const_reference;

   Constant reference to the parameter value

2. typedef implementation_defined reference;

   Mutable reference to the parameter value

3. typedef implementation_defined const_iterator;

   Constant iterator over nested parameters and subsections

4. typedef implementation_defined iterator;

   Mutable iterator over nested parameters and subsections

### `basic_settings_section` public construct/copy/destruct

1.     basic_settings_section();

   Default constructor. Creates an empty settings container.

2.     basic_settings_section(basic_settings_section const & that);

   Copy constructor.

3.     explicit basic_settings_section(property_tree_type * tree);

### `basic_settings_section` public member functions

1.     explicit operator bool() const noexcept;

   Checks if the section refers to the container.

2.     bool operator!() const noexcept;

   Checks if the section refers to the container.

3.     iterator begin();

   Returns an iterator over the nested subsections and parameters.

4.     iterator end();

   Returns an iterator over the nested subsections and parameters.

5.     const_iterator begin() const;

   Returns an iterator over the nested subsections and parameters.

6.     const_iterator end() const;

   Returns an iterator over the nested subsections and parameters.

7.     reverse_iterator rbegin();

   Returns a reverse iterator over the nested subsections and parameters.

8.     reverse_iterator rend();

   Returns a reverse iterator over the nested subsections and parameters.

9.     const_reverse_iterator rbegin() const;

   Returns a reverse iterator over the nested subsections and parameters.

10.     const_reverse_iterator rend() const;

    Returns a reverse iterator over the nested subsections and parameters.

11.     bool empty() const;

    Checks if the container is empty (i.e. contains no sections and parameters).

12.     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:

    `section_name` | The name of the section in which the parameter resides

    Returns: | An unspecified reference type that can be used for parameter name specifying

13.     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:

    `section_name` | The name of the section in which the parameter resides

    Returns: | An unspecified reference type that can be used for parameter name specifying

14.     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:

    `section_name` | The name of the section in which the parameter resides

    Returns: | An unspecified reference type that can be used for parameter name specifying

15.     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:

    `section_name` | The name of the section in which the parameter resides

    Returns: | An unspecified reference type that can be used for parameter name specifying

16.     property_tree_type const & property_tree() const;

    Accessor for the embedded property tree

17.     property_tree_type & property_tree();

    Accessor for the embedded property tree

18.     bool has_section(string_type const & section_name) const;

    Checks if the specified section is present in the container.

    Parameters:

    `section_name` | The name of the section

19.     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:

    `param_name` | The name of the parameter
    `section_name` | The name of the section in which the parameter resides

20.     void swap(basic_settings_section & that);

    Swaps two references to settings sections.