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

Method loadTarget

lib/generation/GenLoader.cpp:35–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35bool GenLoader::loadTarget(const std::string &TargetReportDir) {
36 std::vector<std::string> ReportPath;
37 try {
38 for (auto TargetReportFile : util::readDirectory(TargetReportDir)) {
39 auto JsonString = util::readFile(TargetReportFile.c_str());
40 Json::Value JsonValue = util::strToJson(JsonString);
41 DirectionReport.fromJson(JsonValue);
42 ParamNumberReport.fromJson(JsonValue);
43 TypeReport.fromJson(JsonValue);
44 }
45 } catch (std::invalid_argument &E) {
46 return false;
47 }
48 return true;
49}
50
51bool GenLoader::loadUT(const std::string &UTReportPath) {
52 auto JsonValue = util::parseJsonFileToJsonValue(UTReportPath.c_str());

Callers

nothing calls this directly

Calls 4

readDirectoryFunction · 0.85
readFileFunction · 0.85
strToJsonFunction · 0.85
fromJsonMethod · 0.45

Tested by

no test coverage detected