MCPcopy Create free account
hub / github.com/ddiakopoulos/polymer / from_json

Function from_json

libraries/lib-engine/include/polymer-engine/object.hpp:44–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42 // Linalg Types
43 inline void to_json(json & archive, const int2 & m) { archive = json{ { "x", m.x() },{ "y", m.y() } }; }
44 inline void from_json(const json & archive, int2 & p) { p.x = archive.at("x").get<int32_t>(); p.y = archive.at("y").get<int32_t>(); }
45
46 inline void to_json(json & archive, const int3 & m) { archive = json{ { "x", m.x() },{ "y", m.y() },{ "z", m.z() } }; }
47 inline void from_json(const json & archive, int3 & p) { p.x = archive.at("x").get<int32_t>(); p.y = archive.at("y").get<int32_t>(); p.z = archive.at("z").get<int32_t>(); }

Callers

nothing calls this directly

Calls 7

normalize_json_formatFunction · 0.85
visit_fieldsFunction · 0.70
emptyMethod · 0.45
containsMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected