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

Method ReadClientQuery

Source/cmFileAPI.cxx:410–430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408}
409
410void cmFileAPI::ReadClientQuery(std::string const& client, ClientQueryJson& q)
411{
412 // Read the query.json file.
413 std::string queryFile =
414 cmStrCat(this->APIv1, "/query/", client, "/query.json");
415 Json::Value query;
416 if (!this->ReadJsonFile(queryFile, query, q.Error)) {
417 return;
418 }
419 if (!query.isObject()) {
420 q.Error = "query root is not an object";
421 return;
422 }
423
424 Json::Value const& clientValue = query["client"];
425 if (!clientValue.isNull()) {
426 q.ClientValue = clientValue;
427 }
428 q.RequestsValue = std::move(query["requests"]);
429 q.Requests = this->BuildClientRequests(q.RequestsValue);
430}
431
432Json::Value cmFileAPI::BuildReplyIndex()
433{

Callers 1

ReadClientMethod · 0.95

Calls 6

ReadJsonFileMethod · 0.95
BuildClientRequestsMethod · 0.95
moveFunction · 0.85
isObjectMethod · 0.80
isNullMethod · 0.80
cmStrCatFunction · 0.70

Tested by

no test coverage detected