Files
Lixinzhe_lib/Log/ConfigParser.h

30 lines
709 B
C
Raw Permalink Normal View History

2025-06-16 08:52:40 +08:00
#ifndef CONFIGPARSER_H
#define CONFIGPARSER_H
/**
*
*
* 1ini格式文件
* 2json格式文件
* 3YAML格式文件
* 4Protobuf格式文件
*/
#include <string>
#include <unordered_map>
/** 状态码 */
enum CPStatus {
CPSUCCESS = 0,//成功
CPFILE = -1//文件错误
};
/**
* ini类型的配置文件
* @param path
* @param config unordered_map容器
* @return
*/
CPStatus configFromIni(const std::string &path, std::unordered_map<std::string, std::string> &config);
#endif //CONFIGPARSER_H