MCPcopy Create free account
hub / github.com/MyGUI/mygui / deserialization

Method deserialization

Demos/Demo_Pointers/ResourcePointerContext.cpp:12–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10{
11
12 void ResourcePointerContext::deserialization(MyGUI::xml::ElementPtr _node, MyGUI::Version _version)
13 {
14 Base::deserialization(_node, _version);
15
16 MyGUI::xml::ElementEnumerator info = _node->getElementEnumerator();
17 while (info.next())
18 {
19 if (info->getName() == "Property")
20 {
21 std::string_view key = info->findAttribute("key");
22
23 if (key == "Level")
24 mHighLevel = info->getContent() == "High";
25 }
26 else if (info->getName() == "Map")
27 {
28 MyGUI::xml::ElementEnumerator item = info->getElementEnumerator();
29 while (item.next("Item"))
30 {
31 MyGUI::mapSet(mPointers, item->findAttribute("name"), item->getContent());
32 }
33 }
34 }
35 }
36
37 std::string_view ResourcePointerContext::getPointer(std::string_view _type)
38 {

Callers

nothing calls this directly

Calls 5

getElementEnumeratorMethod · 0.80
findAttributeMethod · 0.80
deserializationFunction · 0.50
mapSetFunction · 0.50
nextMethod · 0.45

Tested by

no test coverage detected