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

Method prepend_child

Tools/EditorFramework/pugixml.cpp:4817–4845  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4815 }
4816
4817 PUGI__FN xml_node xml_node::prepend_child(xml_node_type type_)
4818 {
4819 if (!impl::allow_insert_child(this->type(), type_))
4820 return xml_node();
4821
4822 xml_node n(impl::allocate_node(impl::get_allocator(_root), type_));
4823 if (!n)
4824 return xml_node();
4825
4826 n._root->parent = _root;
4827
4828 xml_node_struct* head = _root->first_child;
4829
4830 if (head)
4831 {
4832 n._root->prev_sibling_c = head->prev_sibling_c;
4833 head->prev_sibling_c = n._root;
4834 }
4835 else
4836 n._root->prev_sibling_c = n._root;
4837
4838 n._root->next_sibling = head;
4839 _root->first_child = n._root;
4840
4841 if (type_ == node_declaration)
4842 n.set_name(PUGIXML_TEXT("xml"));
4843
4844 return n;
4845 }
4846
4847 PUGI__FN xml_node xml_node::insert_child_before(xml_node_type type_, const xml_node& node)
4848 {

Callers 4

generateSkinMethod · 0.45
saveMethod · 0.45
saveMethod · 0.45
saveMethod · 0.45

Calls 5

allow_insert_childFunction · 0.70
xml_nodeClass · 0.70
allocate_nodeFunction · 0.70
typeMethod · 0.45
set_nameMethod · 0.45

Tested by 1

generateSkinMethod · 0.36