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

Function processLine

samples/iptctest.cpp:48–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48bool processLine(const std::string& line, int num, IptcData& iptcData) {
49 switch (line.at(0)) {
50 case 'a':
51 case 'A':
52 processAdd(line, num, iptcData);
53 break;
54 case 'r':
55 case 'R':
56 processRemove(line, num, iptcData);
57 break;
58 case 'm':
59 case 'M':
60 processModify(line, num, iptcData);
61 break;
62 case 'q':
63 case 'Q':
64 return false;
65 default:
66 std::ostringstream os;
67 os << "Unknown command (" << line.at(0) << ") at line " << num;
68 throw Error(ErrorCode::kerErrorMessage, os.str());
69 }
70 return true;
71}
72
73void processAdd(const std::string& line, int num, IptcData& iptcData) {
74 std::string::size_type keyStart = line.find_first_not_of(" \t", 1);

Callers 1

mainFunction · 0.85

Calls 4

processAddFunction · 0.85
processRemoveFunction · 0.85
processModifyFunction · 0.85
ErrorFunction · 0.85

Tested by

no test coverage detected