用于读取和存储配置文件的类 更多...
#include <config.hpp>
Public 类型 | |
| using | ptr = std::shared_ptr< Config > |
| 配置管理句柄 | |
| using | config_map = std::unordered_map< std::string, std::unordered_map< std::string, std::string > > |
| 从section和name获取value的映射表 | |
Public 成员函数 | |
| Config (const std::string &filename) | |
| 构造函数 | |
| std::string | get (const std::string §ion, const std::string &name) |
| 获取配置文件的值 | |
静态 Public 成员函数 | |
| static Config::ptr | getInstance (const std::string &filename) |
| 获取配置文件操作句柄 | |
| static Config::ptr | getInstance () |
| 获取配置文件操作句柄 | |
Private 成员函数 | |
| void | init (INIReader &reader) |
| 读取配置文件并写入到映射表中 | |
Private 属性 | |
| config_map | _config_data |
| 从section和name获取value的映射表 | |
静态 Private 属性 | |
| static ptr | _instance = nullptr |
| 配置文件操作句柄 | |
用于读取和存储配置文件的类
| using XuServer::Config::config_map = std::unordered_map<std::string, std::unordered_map<std::string, std::string> > |
从section和name获取value的映射表
| using XuServer::Config::ptr = std::shared_ptr<Config> |
配置管理句柄
|
inline |
构造函数
| filename | 配置文件路径 |

|
inline |
获取配置文件的值
| section | section 方括号中的值 |
| name | 字段名称 |
|
inlinestatic |
获取配置文件操作句柄

|
inlinestatic |
获取配置文件操作句柄
| filename | 配置文件路径 |
|
inlineprivate |
读取配置文件并写入到映射表中
| reader | ini读取器 |


|
private |
从section和name获取value的映射表
|
staticprivate |
配置文件操作句柄