1#ifndef NEFORCE_CORE_FILE_INI_INI_PARSER_HPP__
2#define NEFORCE_CORE_FILE_INI_INI_PARSER_HPP__
15NEFORCE_BEGIN_NAMESPACE__
59 void skip_whitespace()
noexcept;
66 void skip_line()
noexcept;
72 char current()
const noexcept;
79 char peek(
size_t offset = 1)
const noexcept;
85 bool eof()
const noexcept;
99 bool is_comment_line(
const string& line)
const;
110 bool is_section_line(
const string& line,
string& section_name)
const;
123 bool parse_key_value(
const string& line,
string& key,
string& value)
const;
134 void parse_line(
const string& line);
144 text_(_NEFORCE
move(text)),
147 current_section_ = root_->get_global_section();
174NEFORCE_END_NAMESPACE__
optional< unique_ptr< ini_document > > try_parse()
尝试执行解析
ini_parser(string text)
构造函数
unique_ptr< ini_document > parse()
执行解析
constexpr void advance(Iterator &i, Distance n)
将迭代器前进指定距离
constexpr Iterator2 move(Iterator1 first, Iterator1 last, Iterator2 result) noexcept(noexcept(inner::__move_aux(first, last, result)))
移动范围元素
NEFORCE_NODISCARD NEFORCE_ALWAYS_INLINE constexpr decltype(auto) size(const Container &cont) noexcept(noexcept(cont.size()))
获取容器的大小
NEFORCE_CONSTEXPR20 unique_ptr< T > make_unique(Args &&... args)
创建unique_ptr