MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / step_fill

Method step_fill

Source/ThirdParty/pugixml/pugixml.cpp:8853–9044  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8851 }
8852
8853 template <class T> void step_fill(xpath_node_set_raw& ns, xml_node_struct* n, xpath_allocator* alloc, bool once, T)
8854 {
8855 const axis_t axis = T::axis;
8856
8857 switch (axis)
8858 {
8859 case axis_attribute:
8860 {
8861 for (xml_attribute_struct* a = n->first_attribute; a; a = a->next_attribute)
8862 if (step_push(ns, a, n, alloc) & once)
8863 return;
8864
8865 break;
8866 }
8867
8868 case axis_child:
8869 {
8870 for (xml_node_struct* c = n->first_child; c; c = c->next_sibling)
8871 if (step_push(ns, c, alloc) & once)
8872 return;
8873
8874 break;
8875 }
8876
8877 case axis_descendant:
8878 case axis_descendant_or_self:
8879 {
8880 if (axis == axis_descendant_or_self)
8881 if (step_push(ns, n, alloc) & once)
8882 return;
8883
8884 xml_node_struct* cur = n->first_child;
8885
8886 while (cur)
8887 {
8888 if (step_push(ns, cur, alloc) & once)
8889 return;
8890
8891 if (cur->first_child)
8892 cur = cur->first_child;
8893 else
8894 {
8895 while (!cur->next_sibling)
8896 {
8897 cur = cur->parent;
8898
8899 if (cur == n) return;
8900 }
8901
8902 cur = cur->next_sibling;
8903 }
8904 }
8905
8906 break;
8907 }
8908
8909 case axis_following_sibling:
8910 {

Callers

nothing calls this directly

Calls 5

node_is_ancestorFunction · 0.85
nodeMethod · 0.80
internal_objectMethod · 0.80
attributeMethod · 0.80
parentMethod · 0.80

Tested by

no test coverage detected