2024-05-15 10:59:43 +08:00
|
|
|
#ifndef CONIFG_HEADER
|
|
|
|
#define CONIFG_HEADER
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <SimpleIni.h>
|
|
|
|
#include "../public_def.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
[Basic]
|
|
|
|
oper_node=IODEF/ITEMS
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
class ConfigIni
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ConfigIni() = default;
|
|
|
|
~ConfigIni() = default;
|
|
|
|
|
|
|
|
public:
|
|
|
|
bool set_work_exe(const std::string& dir);
|
2024-05-17 22:46:33 +08:00
|
|
|
void set_xml_path(const std::string& path);
|
2024-05-15 10:59:43 +08:00
|
|
|
OprBase get_config();
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool parse_ini();
|
|
|
|
private:
|
|
|
|
std::string work_dir_{};
|
|
|
|
std::string ini_path_{};
|
|
|
|
CSimpleIni ini_{};
|
|
|
|
OprBase opr_base_{};
|
|
|
|
};
|
|
|
|
|
2024-05-17 22:46:33 +08:00
|
|
|
#endif
|