irccd  3.0.3
Public Member Functions | List of all members
irccd::ini::document Class Reference

Ini document description. More...

#include <ini.hpp>

Inheritance diagram for irccd::ini::document:
irccd::config

Public Member Functions

auto contains (std::string_view key) const noexcept -> bool
 
auto get (std::string_view key) const noexcept -> section
 
auto find (std::string_view key) noexcept -> iterator
 
auto find (std::string_view key) const noexcept -> const_iterator
 
auto operator[] (std::string_view key) -> section &
 
auto operator[] (std::string_view key) const -> const section &
 

Detailed Description

Ini document description.

See also
read_file
read_string

Member Function Documentation

◆ contains()

auto irccd::ini::document::contains ( std::string_view  key) const -> bool
noexcept

Check if a document has a specific section.

Parameters
keythe key
Returns
true if the document contains the section

◆ find() [1/2]

auto irccd::ini::document::find ( std::string_view  key) const -> const_iterator
noexcept

Find a section by key and return an iterator.

Parameters
keythe key
Returns
the iterator or end() if not found

◆ find() [2/2]

auto irccd::ini::document::find ( std::string_view  key) -> iterator
noexcept

Find a section by key and return an iterator.

Parameters
keythe key
Returns
the iterator or end() if not found

◆ get()

auto irccd::ini::document::get ( std::string_view  key) const -> section
noexcept

Find a section or return an empty one if not found.

Parameters
keythe key
Returns
the section or empty one if not found

◆ operator[]() [1/2]

auto irccd::ini::document::operator[] ( std::string_view  key) -> section &

Access a section at the specified key.

Parameters
keythe key
Returns
the section
Precondition
contains(key) must return true

◆ operator[]() [2/2]

auto irccd::ini::document::operator[] ( std::string_view  key) const -> const section &

Overloaded function.

Parameters
keythe key
Returns
the section
Precondition
contains(key) must return true

The documentation for this class was generated from the following file: