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

Method createCopy

MyGUIEngine/src/MyGUI_XmlDocument.cpp:282–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280 }
281
282 std::unique_ptr<Element> Element::createCopy()
283 {
284 auto elem = std::make_unique<Element>(mName, nullptr, mType, mContent);
285 elem->mAttributes = mAttributes;
286
287 for (const auto& oldChild : mChildren)
288 {
289 auto child = oldChild->createCopy();
290 child->mParent = elem.get();
291 elem->mChildren.emplace_back(std::move(child));
292 }
293
294 return elem;
295 }
296
297 void Element::setAttribute(std::string_view _key, std::string_view _value)
298 {

Callers 1

deserializationMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected