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

Method parseGroup

Tools/ImageEditor/ImageExportSerializer.cpp:56–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54 }
55
56 void ImageExportSerializer::parseGroup(pugi::xml_node _node, DataPtr _parent)
57 {
58 DataPtr data = Data::CreateInstance();
59 data->setType(DataTypeManager::getInstance().getType("Group"));
60 std::string value = _node.attribute("name").value();
61 if (value.empty())
62 value = "unnamed";
63 data->setPropertyValue("Name", value);
64 data->setPropertyValue("Texture", _node.attribute("texture").value());
65 MyGUI::IntSize size = MyGUI::IntSize::parse(_node.attribute("size").value());
66 data->setPropertyValue("Size", MyGUI::IntCoord(0, 0, size.width, size.height).print());
67
68 _parent->addChild(data);
69
70 pugi::xpath_node_set nodes = _node.select_nodes("Index");
71 for (const auto& node : nodes)
72 parseIndex(node.node(), data);
73 }
74
75 void ImageExportSerializer::parseIndex(pugi::xml_node _node, DataPtr _parent)
76 {

Callers

nothing calls this directly

Calls 12

parseFunction · 0.50
IntCoordFunction · 0.50
setTypeMethod · 0.45
getTypeMethod · 0.45
valueMethod · 0.45
attributeMethod · 0.45
emptyMethod · 0.45
setPropertyValueMethod · 0.45
printMethod · 0.45
addChildMethod · 0.45
select_nodesMethod · 0.45
nodeMethod · 0.45

Tested by

no test coverage detected