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

Method create

Tools/EditorFramework/pugixml.cpp:5709–5733  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5707 }
5708
5709 PUGI__FN void xml_document::create()
5710 {
5711 // initialize sentinel page
5712 PUGI__STATIC_ASSERT(
5713 offsetof(impl::xml_memory_page, data) + sizeof(impl::xml_document_struct) +
5714 impl::xml_memory_page_alignment <=
5715 sizeof(_memory));
5716
5717 // align upwards to page boundary
5718 void* page_memory = reinterpret_cast<void*>(
5719 (reinterpret_cast<uintptr_t>(_memory) + (impl::xml_memory_page_alignment - 1)) &
5720 ~(impl::xml_memory_page_alignment - 1));
5721
5722 // prepare page structure
5723 impl::xml_memory_page* page = impl::xml_memory_page::construct(page_memory);
5724
5725 page->busy_size = impl::xml_memory_page_size;
5726
5727 // allocate new root
5728 _root = new (page->data) impl::xml_document_struct(page);
5729 _root->prev_sibling_c = _root;
5730
5731 // setup sentinel page
5732 page->allocator = static_cast<impl::xml_document_struct*>(_root);
5733 }
5734
5735 PUGI__FN void xml_document::destroy()
5736 {

Callers 15

commandLoadMethod · 0.45
commandClearMethod · 0.45
commandQuitMethod · 0.45
commandFileDropMethod · 0.45
loadMethod · 0.45
saveMethod · 0.45
showMessagesMethod · 0.45
command_LoadMethod · 0.45
command_ClearMethod · 0.45
command_QuitMethod · 0.45
command_FileDropMethod · 0.45
loadMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected