MCPcopy Create free account
hub / github.com/Mixaill/FakePDB / load

Method load

src_cpp/src/data/db.cpp:55–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 }
54
55 void DB::load(std::filesystem::path &filepath) {
56 std::ifstream istream(filepath);
57 if (!istream.is_open()) {
58 return;
59 }
60
61 nlohmann::json json;
62 istream >> json;
63 _root = json.get<Root>();
64
65 //Labels
66 for (auto &idaFunc : _root.functions) {
67 for (auto &idaLabel : idaFunc.labels) {
68 idaLabel.name = idaFunc.name + ":::" + idaLabel.name;
69 }
70 }
71 }
72
73 void DB::Save(std::filesystem::path &filepath) {
74 nlohmann::json json = _root;

Callers 1

process_jsonMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected