|
|
@ -14,15 +14,17 @@ bool clearComments(string &a); |
|
|
|
void parseConfigLine(const string a, string &b, string &c); |
|
|
|
void parseConfigLine(const string a, string &b, string &c); |
|
|
|
|
|
|
|
|
|
|
|
class config { |
|
|
|
class config { |
|
|
|
public: |
|
|
|
vector<string> necessary; |
|
|
|
vector<string> necessary; // = {"Username", "API", "Domain", "consolePrintLogs", "DinioServer1", "DinioServer2", "DinioGetIPURL", "DinioServer1Port", "DinioServer2Port" };
|
|
|
|
|
|
|
|
map<string, string> element; |
|
|
|
map<string, string> element; |
|
|
|
|
|
|
|
|
|
|
|
config(const string _configFilePath, const vector<string> _necessary = {}); |
|
|
|
bool isHaveNecessary();
|
|
|
|
|
|
|
|
bool init(const string _configFilePath);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
config(const string _configFilePath, const vector<string> _necessary = {}); |
|
|
|
|
|
|
|
string operator[] (const string& key); |
|
|
|
void print(); |
|
|
|
void print(); |
|
|
|
bool init(const string _configFilePath);
|
|
|
|
|
|
|
|
bool isHaveNecessary();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|