MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / updateValue

Method updateValue

libminifi/src/properties/PropertiesFile.cpp:52–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52void 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
62PropertiesFile::PropertiesFile(std::istream& input_stream) {
63 std::string line;

Callers 2

updateMethod · 0.80

Calls 2

replaceMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected