| 430 | } |
| 431 | |
| 432 | Json::Value cmFileAPI::BuildReplyIndex() |
| 433 | { |
| 434 | Json::Value index(Json::objectValue); |
| 435 | |
| 436 | // Report information about this version of CMake. |
| 437 | index["cmake"] = this->BuildCMake(); |
| 438 | |
| 439 | // Reply to all queries that we loaded. |
| 440 | Json::Value& reply = index["reply"] = this->BuildReply(this->TopQuery); |
| 441 | for (auto const& client : this->ClientQueries) { |
| 442 | std::string const& clientName = client.first; |
| 443 | ClientQuery const& clientQuery = client.second; |
| 444 | reply[clientName] = this->BuildClientReply(clientQuery); |
| 445 | } |
| 446 | |
| 447 | // Move our index of generated objects into its field. |
| 448 | Json::Value& objects = index["objects"] = Json::arrayValue; |
| 449 | for (auto& entry : this->ReplyIndexObjects) { |
| 450 | objects.append(std::move(entry.second)); // NOLINT(*) |
| 451 | } |
| 452 | |
| 453 | return index; |
| 454 | } |
| 455 | |
| 456 | Json::Value cmFileAPI::BuildCMake() |
| 457 | { |
no test coverage detected