| 41 | } |
| 42 | |
| 43 | void ConfigFile::extractContents(const std::string &line) |
| 44 | { |
| 45 | std::string temp = line; |
| 46 | temp.erase(0, temp.find_first_not_of("\t ")); |
| 47 | size_t sepPos = temp.find('='); |
| 48 | |
| 49 | std::string key, value; |
| 50 | extractKey(key, sepPos, temp); |
| 51 | extractValue(value, sepPos, temp); |
| 52 | |
| 53 | if (!keyExists(key)) |
| 54 | contents.insert(std::pair<std::string, std::string>(key, value)); |
| 55 | else |
| 56 | exitWithError("CFG: Can only have unique key names!\n"); |
| 57 | } |
| 58 | |
| 59 | void ConfigFile::parseLine(const std::string &line, size_t const lineNo) |
| 60 | { |
nothing calls this directly
no outgoing calls
no test coverage detected