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

Method fromJson

lib/analysis/TypeAnalysisReport.cpp:19–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19bool TypeAnalysisReport::fromJson(Json::Value Report) {
20 if (!Report.isMember(getReportType()))
21 return false;
22
23 const auto &Root = Report[getReportType()];
24 if (Root.isMember("enums")) {
25 const auto &EnumsValue = Root["enums"];
26 if (!EnumsValue.isObject())
27 return false;
28
29 try {
30 for (const auto &Name : EnumsValue.getMemberNames()) {
31 Enums.emplace(Name, std::make_shared<Enum>(EnumsValue[Name]));
32 }
33 } catch (Json::LogicError &E) {
34 return false;
35 }
36 }
37 return true;
38}
39
40const std::map<std::string, std::shared_ptr<Enum>> &
41TypeAnalysisReport::getEnums() const {

Callers

nothing calls this directly

Calls 3

isMemberMethod · 0.80
isObjectMethod · 0.80
getMemberNamesMethod · 0.80

Tested by

no test coverage detected