初版。
This commit is contained in:
36
read_config.h
Normal file
36
read_config.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef READ_CONFIG
|
||||
#define READ_CONFIG
|
||||
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
enum class ActionType {
|
||||
CT_CONFIG,
|
||||
CT_BUILD,
|
||||
CT_CLEAR
|
||||
};
|
||||
|
||||
struct CMakeCmd {
|
||||
ActionType type;
|
||||
std::vector<std::string> args;
|
||||
};
|
||||
|
||||
struct CmdInfo {
|
||||
std::string vsbat;
|
||||
std::unordered_map<std::string, std::vector<CMakeCmd>> data;
|
||||
};
|
||||
|
||||
class ReadConfig
|
||||
{
|
||||
public:
|
||||
ReadConfig();
|
||||
|
||||
public:
|
||||
bool Read(CmdInfo& info, ActionType type, const std::string& path);
|
||||
ActionType GetType(const std::string& action);
|
||||
|
||||
public:
|
||||
std::string mainRoot_;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user