| 47 | } |
| 48 | |
| 49 | ILayerNode* RTTLayer::createChildItemNode() |
| 50 | { |
| 51 | // создаем рутовый айтем |
| 52 | RTTLayerNode* node = new RTTLayerNode(this); |
| 53 | mChildItems.push_back(node); |
| 54 | |
| 55 | if (mData != nullptr) |
| 56 | { |
| 57 | FactoryManager& factory = FactoryManager::getInstance(); |
| 58 | |
| 59 | MyGUI::xml::ElementEnumerator controller = mData->getElementEnumerator(); |
| 60 | while (controller.next()) |
| 61 | { |
| 62 | IObject* object = factory.createObject(controller->getName(), controller->findAttribute("type")); |
| 63 | if (object == nullptr) |
| 64 | continue; |
| 65 | |
| 66 | LayerNodeAnimation* data = object->castType<LayerNodeAnimation>(false); |
| 67 | if (data == nullptr) |
| 68 | { |
| 69 | factory.destroyObject(object); |
| 70 | continue; |
| 71 | } |
| 72 | data->deserialization(controller.current(), mVersion); |
| 73 | data->attach(node); |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | return node; |
| 78 | } |
| 79 | |
| 80 | void RTTLayer::destroyChildItemNode(ILayerNode* _item) |
| 81 | { |
nothing calls this directly
no test coverage detected