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

Method deserialization

MyGUIEngine/src/MyGUI_ResourceImageSetPointer.cpp:15–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13{
14
15 void ResourceImageSetPointer::deserialization(xml::ElementPtr _node, Version _version)
16 {
17 Base::deserialization(_node, _version);
18
19 // берем детей и крутимся, основной цикл
20 xml::ElementEnumerator info = _node->getElementEnumerator();
21 while (info.next("Property"))
22 {
23 std::string_view key = info->findAttribute("key");
24 std::string_view value = info->findAttribute("value");
25
26 if (key == "Point")
27 mPoint = IntPoint::parse(value);
28 else if (key == "Size")
29 mSize = IntSize::parse(value);
30 else if (key == "Resource")
31 mImageSet = ResourceManager::getInstance().getByName(value)->castType<ResourceImageSet>();
32 }
33 }
34
35 void ResourceImageSetPointer::setImage(ImageBox* _image)
36 {

Callers

nothing calls this directly

Calls 6

getElementEnumeratorMethod · 0.80
findAttributeMethod · 0.80
deserializationFunction · 0.50
parseFunction · 0.50
nextMethod · 0.45
getByNameMethod · 0.45

Tested by

no test coverage detected