MCPcopy Create free account
hub / github.com/chrxh/alien / decodeUserData

Method decodeUserData

source/Network/NetworkResourceParserService.cpp:40–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40std::vector<UserTO> NetworkResourceParserService::decodeUserData(boost::property_tree::ptree const& tree)
41{
42 std::vector<UserTO> result;
43 for (auto const& [key, subTree] : tree) {
44 UserTO entry;
45 entry.userName = subTree.get<std::string>("userName");
46 entry.starsReceived = subTree.get<int>("starsReceived");
47 entry.starsGiven = subTree.get<int>("starsGiven");
48 entry.timestamp = subTree.get<std::string>("timestamp");
49 entry.online = subTree.get<bool>("online");
50 entry.lastDayOnline = subTree.get<bool>("lastDayOnline");
51 entry.timeSpent = subTree.get<int>("timeSpent");
52 entry.gpu = subTree.get<std::string>("gpu");
53 result.emplace_back(entry);
54 }
55 return result;
56}

Callers 1

getUserListMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected