|
NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
|
INI文档类 更多...
#include <ini_value.hpp>
Public 成员函数 | |
| ini_document () | |
| 构造函数 | |
| ini_document (ini_document &&other) noexcept=default | |
| 移动构造函数 | |
| ini_document & | operator= (ini_document &&other) noexcept=default |
| 移动赋值运算符 | |
| void | add_section (const string &name, unique_ptr< ini_section > section) |
| 添加节 | |
| const ini_section * | get_section (const string &name) const |
| 获取常量节指针 | |
| ini_section * | get_section (const string &name) |
| 获取节指针 | |
| bool | has_section (const string &name) const |
| 检查节是否存在 | |
| const unordered_map< string, unique_ptr< ini_section > > & | get_sections () const noexcept |
| 获取所有节的常量引用 | |
| const ini_section * | get_global_section () const noexcept |
| 获取全局节的常量指针 | |
| ini_section * | get_global_section () noexcept |
| 获取全局节的指针 | |
| string | get_string (const string §ion, const string &key, const string &default_value="") const |
| 获取字符串值 | |
| int | get_int (const string §ion, const string &key, int default_value=0) const |
| 获取整数值 | |
| double | get_double (const string §ion, const string &key, double default_value=0.0) const |
| 获取双精度浮点值 | |
| bool | get_bool (const string §ion, const string &key, bool default_value=false) const |
| 获取布尔值 | |
| string | to_string () const |
| 转换为字符串 | |
| Public 成员函数 继承自 istringify< ini_document > | |
| constexpr string | to_string () const |
| 转换为字符串 | |
|
inline |
构造函数
创建空文档,初始化全局节。
在文件 ini_value.hpp 第 372 行定义.
引用了 make_unique().
被这些函数引用 ini_document() , 以及 operator=().
|
defaultnoexcept |
|
inline |
|
inlinenodiscard |
获取布尔值
| section | 节名称 |
| key | 属性键名 |
| default_value | 默认值 |
在文件 ini_value.hpp 第 514 行定义.
引用了 ini_section::get_bool() , 以及 get_section().
|
inlinenodiscard |
获取双精度浮点值
| section | 节名称 |
| key | 属性键名 |
| default_value | 默认值 |
在文件 ini_value.hpp 第 502 行定义.
引用了 ini_section::get_double() , 以及 get_section().
|
inlinenodiscardnoexcept |
|
inlinenodiscardnoexcept |
|
inlinenodiscard |
获取整数值
| section | 节名称 |
| key | 属性键名 |
| default_value | 默认值 |
在文件 ini_value.hpp 第 490 行定义.
引用了 ini_section::get_int() , 以及 get_section().
|
inlinenodiscard |
|
inlinenodiscard |
获取常量节指针
| name | 节名称 |
在文件 ini_value.hpp 第 411 行定义.
引用了 name().
被这些函数引用 get_bool(), get_double(), get_int() , 以及 get_string().
|
inlinenodiscardnoexcept |
|
inlinenodiscard |
获取字符串值
| section | 节名称 |
| key | 属性键名 |
| default_value | 默认值 |
在文件 ini_value.hpp 第 477 行定义.
引用了 get_section() , 以及 ini_section::get_string().
|
inlinenodiscard |
|
defaultnoexcept |
|
nodiscard |
转换为字符串