MCPcopy Create free account
hub / github.com/Tylemagne/Gopher360 / extractContents

Method extractContents

Windows/Gopher/Gopher/ConfigFile.cpp:43–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void 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
59void ConfigFile::parseLine(const std::string &line, size_t const lineNo)
60{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected