func:添加选择文件功能并自动记录
This commit is contained in:
@@ -16,10 +16,18 @@ bool ConfigIni::set_work_exe(const std::string& dir)
|
||||
if (!parse_ini()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ConfigIni::set_xml_path(const std::string& path)
|
||||
{
|
||||
if (ini_.IsEmpty()) {
|
||||
return ;
|
||||
}
|
||||
ini_.SetValue("Basic", "xml_path", path.c_str());
|
||||
ini_.SaveFile(ini_path_.c_str());
|
||||
}
|
||||
|
||||
OprBase ConfigIni::get_config()
|
||||
{
|
||||
return opr_base_;
|
||||
|
||||
@@ -20,6 +20,7 @@ public:
|
||||
|
||||
public:
|
||||
bool set_work_exe(const std::string& dir);
|
||||
void set_xml_path(const std::string& path);
|
||||
OprBase get_config();
|
||||
|
||||
private:
|
||||
@@ -31,4 +32,4 @@ private:
|
||||
OprBase opr_base_{};
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include <string>
|
||||
#include <tinyxml2.h>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include "../public_def.h"
|
||||
|
||||
struct SKeyValue {
|
||||
@@ -43,4 +42,4 @@ private:
|
||||
std::vector<std::string> keys_{};
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user