MCPcopy Create free account
hub / github.com/Kitware/CMake / GetString

Method GetString

Source/cmQtAutoGenerator.cxx:271–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271bool cmQtAutoGenerator::InfoT::GetString(std::string const& key,
272 std::string& value,
273 bool required) const
274{
275 Json::Value const& jval = this->Json_[key];
276 if (!jval.isString()) {
277 if (!jval.isNull() || required) {
278 return this->LogError(cmStrCat(key, " is not a string."));
279 }
280 } else {
281 value = jval.asString();
282 if (value.empty() && required) {
283 return this->LogError(cmStrCat(key, " is empty."));
284 }
285 }
286 return true;
287}
288
289bool cmQtAutoGenerator::InfoT::GetStringConfig(std::string const& key,
290 std::string& value,

Callers 2

GetStringConfigMethod · 0.95
RunMethod · 0.45

Calls 6

LogErrorMethod · 0.95
isStringMethod · 0.80
isNullMethod · 0.80
asStringMethod · 0.80
cmStrCatFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected