| 6 | #include <stdio.h> |
| 7 | |
| 8 | class CFGParser{ |
| 9 | struct CFGItem{ |
| 10 | std::string name; |
| 11 | std::string value; |
| 12 | }; |
| 13 | private: |
| 14 | std::vector<std::pair<std::string, std::vector<CFGItem>>> items; |
| 15 | FILE* cfgFile = nullptr; |
| 16 | std::vector<char> cfgData; |
| 17 | public: |
| 18 | CFGParser(const char* path); |
| 19 | ~CFGParser(); |
| 20 | |
| 21 | void Parse(); |
| 22 | auto& GetItems() { return items; }; |
| 23 | }; |