MCPcopy Create free account
hub / github.com/creatale/node-dv / getString

Method getString

deps/opencv/modules/core/src/cmdparser.cpp:256–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256std::string CommandLineParser::getString(const std::string& keys)
257{
258 std::map<std::string, std::vector<std::string> >::iterator it;
259 std::vector<string> valueVector;
260
261 for(it = data.begin(); it != data.end(); it++)
262 {
263 valueVector = split_string(it->first, "|");
264 for (size_t i = 0; i < valueVector.size(); i++) valueVector[i] = del_space(valueVector[i]);
265
266 if (valueVector.size() == 1) valueVector.push_back("");
267
268 if ((del_space(keys).compare(valueVector[0]) == 0) ||
269 (del_space(keys).compare(valueVector[1]) == 0))
270 return it->second[0];
271 }
272 return string();
273}
274
275template<typename _Tp>
276 _Tp CommandLineParser::fromStringNumber(const std::string& str)//the default conversion function for numbers

Callers

nothing calls this directly

Calls 8

split_stringFunction · 0.85
del_spaceFunction · 0.85
stringFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
compareMethod · 0.45

Tested by

no test coverage detected