MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / document_buffer_order

Function document_buffer_order

lib/pugixml/src/pugixml.cpp:8095–8124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8093 }
8094
8095 PUGI__FN const void* document_buffer_order(const xpath_node& xnode)
8096 {
8097 xml_node_struct* node = xnode.node().internal_object();
8098
8099 if (node)
8100 {
8101 if ((get_document(node).header & xml_memory_page_contents_shared_mask) == 0)
8102 {
8103 if (node->name && (node->header & impl::xml_memory_page_name_allocated_or_shared_mask) == 0) return node->name;
8104 if (node->value && (node->header & impl::xml_memory_page_value_allocated_or_shared_mask) == 0) return node->value;
8105 }
8106
8107 return 0;
8108 }
8109
8110 xml_attribute_struct* attr = xnode.attribute().internal_object();
8111
8112 if (attr)
8113 {
8114 if ((get_document(attr).header & xml_memory_page_contents_shared_mask) == 0)
8115 {
8116 if ((attr->header & impl::xml_memory_page_name_allocated_or_shared_mask) == 0) return attr->name;
8117 if ((attr->header & impl::xml_memory_page_value_allocated_or_shared_mask) == 0) return attr->value;
8118 }
8119
8120 return 0;
8121 }
8122
8123 return 0;
8124 }
8125
8126 struct document_order_comparator
8127 {

Callers 1

operator()Method · 0.85

Calls 3

internal_objectMethod · 0.80
nodeMethod · 0.80
attributeMethod · 0.80

Tested by

no test coverage detected