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

Method GetBool

Source/cmQtAutoGenerator.cxx:311–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309}
310
311bool cmQtAutoGenerator::InfoT::GetBool(std::string const& key, bool& value,
312 bool required) const
313{
314 Json::Value const& jval = this->Json_[key];
315 if (jval.isBool()) {
316 value = jval.asBool();
317 } else {
318 if (!jval.isNull() || required) {
319 return this->LogError(cmStrCat(key, " is not a boolean."));
320 }
321 }
322 return true;
323}
324
325bool cmQtAutoGenerator::InfoT::GetUInt(std::string const& key,
326 unsigned int& value,

Callers 3

deserializeMethod · 0.80
InitFromInfoMethod · 0.80
InitFromInfoMethod · 0.80

Calls 5

LogErrorMethod · 0.95
isBoolMethod · 0.80
asBoolMethod · 0.80
isNullMethod · 0.80
cmStrCatFunction · 0.70

Tested by

no test coverage detected