Files
cmake-vsenv/read_config.h
2026-02-26 22:40:23 +08:00

37 lines
566 B
C++

#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