MCPcopy Create free account
hub / github.com/Samsung/UTopia / dump

Method dump

lib/target_analysis/TargetLibAnalyzer.cpp:84–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84bool TargetLibAnalyzer::dump(std::string OutputFilePath) const {
85 if (!AnalyzedTargetLib)
86 return false;
87
88 Json::Value Root = AnalyzedTargetLib->toJson();
89
90 for (auto &Report : Reports) {
91 if (!Report)
92 continue;
93
94 auto ReportJson = Report->toJson();
95 for (auto MemberName : ReportJson.getMemberNames())
96 Root[MemberName] = ReportJson[MemberName];
97 }
98
99 Json::StreamWriterBuilder Writer;
100 std::ofstream Ofs(OutputFilePath);
101 Ofs << Json::writeString(Writer, Root);
102 Ofs.close();
103 return true;
104}
105
106const SourceCollection *TargetLibAnalyzer::getSourceCollection() const {
107 return SC.get();

Callers

nothing calls this directly

Calls 3

writeStringFunction · 0.85
getMemberNamesMethod · 0.80
toJsonMethod · 0.45

Tested by

no test coverage detected