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

Method validate

Utilities/cmjsoncpp/src/lib_json/json_writer.cpp:1210–1231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1208}
1209
1210bool StreamWriterBuilder::validate(Json::Value* invalid) const {
1211 static const auto& valid_keys = *new std::set<String>{
1212 "indentation",
1213 "commentStyle",
1214 "enableYAMLCompatibility",
1215 "dropNullPlaceholders",
1216 "useSpecialFloats",
1217 "emitUTF8",
1218 "precision",
1219 "precisionType",
1220 };
1221 for (auto si = settings_.begin(); si != settings_.end(); ++si) {
1222 auto key = si.name();
1223 if (valid_keys.count(key))
1224 continue;
1225 if (invalid)
1226 (*invalid)[key] = *si;
1227 else
1228 return false;
1229 }
1230 return invalid ? invalid->empty() : true;
1231}
1232
1233Value& StreamWriterBuilder::operator[](const String& key) {
1234 return settings_[key];

Callers

nothing calls this directly

Calls 5

beginMethod · 0.45
endMethod · 0.45
nameMethod · 0.45
countMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected