| 237 | } |
| 238 | |
| 239 | std::vector<std::vector<int>> splitDims(const int size, const std::string string) { |
| 240 | std::vector<std::vector<int>> dims(size); |
| 241 | std::string rest = string; |
| 242 | for (int i = 0; i < size; ++i) { |
| 243 | auto position = rest.find(","); |
| 244 | dims[i] = stringToDims(rest.substr(0, position), "x"); |
| 245 | rest = rest.substr(position + 1, rest.size()); |
| 246 | } |
| 247 | return dims; |
| 248 | } |
| 249 | |
| 250 | ConfigFile::ConfigFile(std::string filename, std::string delimiter, std::string comment) : m_Delimiter(delimiter), m_Comment(comment) { |
| 251 | // Construct a ConfigFile, getting keys and values from given file |