MCPcopy Create free account
hub / github.com/Exiv2/exiv2 / processRemove

Function processRemove

samples/iptctest.cpp:102–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102void processRemove(const std::string& line, int num, IptcData& iptcData) {
103 std::string::size_type keyStart = line.find_first_not_of(" \t", 1);
104
105 if (keyStart == std::string::npos) {
106 std::ostringstream os;
107 os << "Invalid \'r\' command at line " << num;
108 throw Error(ErrorCode::kerErrorMessage, os.str());
109 }
110
111 const std::string key(line.substr(keyStart));
112 IptcKey iptcKey(key);
113
114 auto iter = iptcData.findKey(iptcKey);
115 if (iter != iptcData.end()) {
116 iptcData.erase(iter);
117 }
118}
119
120void processModify(const std::string& line, int num, IptcData& iptcData) {
121 std::string::size_type keyStart = line.find_first_not_of(" \t", 1);

Callers 1

processLineFunction · 0.85

Calls 4

ErrorFunction · 0.85
findKeyMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected