| 79 | } |
| 80 | |
| 81 | Json::Value SourceAnalysisReport::toJson() const { |
| 82 | Json::Value Result; |
| 83 | Result[getReportType()]["mainfuncloc"] = MainFuncLoc.getJsonValue(); |
| 84 | |
| 85 | Json::Value SourceInfoJson; |
| 86 | for (const auto &Iter1 : SourceInfoMap) { |
| 87 | Json::Value SourceInfoElementJson; |
| 88 | SourceInfoElementJson["endoffset"] = Iter1.second.EndOffset; |
| 89 | Json::Value IncludedHeaderElementJson(Json::arrayValue); |
| 90 | for (const auto &Iter2 : Iter1.second.IncludedHeaders) |
| 91 | IncludedHeaderElementJson.append(Iter2); |
| 92 | SourceInfoElementJson["includedheaders"] = IncludedHeaderElementJson; |
| 93 | Result[getReportType()]["sourceinfo"][Iter1.first] = SourceInfoElementJson; |
| 94 | } |
| 95 | |
| 96 | Result[getReportType()]["srcbasedir"] = SrcBaseDir; |
| 97 | return Result; |
| 98 | } |
nothing calls this directly
no test coverage detected