| 50 | } |
| 51 | |
| 52 | void PropertiesFile::Line::updateValue(const std::string& value) { |
| 53 | auto pos = line_.find('='); |
| 54 | if (pos != std::string::npos) { |
| 55 | line_.replace(pos + 1, std::string::npos, value); |
| 56 | value_ = value; |
| 57 | } else { |
| 58 | throw std::invalid_argument{"Cannot update value in config line: it does not contain an = sign!"}; |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | PropertiesFile::PropertiesFile(std::istream& input_stream) { |
| 63 | std::string line; |
no test coverage detected