MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / step_push

Method step_push

src/pugiXML/pugixml.cpp:7604–7633  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7602 }
7603
7604 void step_push(xpath_node_set_raw& ns, const xml_attribute& a, const xml_node& parent, xpath_allocator* alloc)
7605 {
7606 if (!a) return;
7607
7608 const char_t* name = a.name();
7609
7610 // There are no attribute nodes corresponding to attributes that declare namespaces
7611 // That is, "xmlns:..." or "xmlns"
7612 if (starts_with(name, PUGIXML_TEXT("xmlns")) && (name[5] == 0 || name[5] == ':')) return;
7613
7614 switch (_test)
7615 {
7616 case nodetest_name:
7617 if (strequal(name, _data.nodetest)) ns.push_back(xpath_node(a, parent), alloc);
7618 break;
7619
7620 case nodetest_type_node:
7621 case nodetest_all:
7622 ns.push_back(xpath_node(a, parent), alloc);
7623 break;
7624
7625 case nodetest_all_in_namespace:
7626 if (starts_with(name, _data.nodetest))
7627 ns.push_back(xpath_node(a, parent), alloc);
7628 break;
7629
7630 default:
7631 ;
7632 }
7633 }
7634
7635 void step_push(xpath_node_set_raw& ns, const xml_node& n, xpath_allocator* alloc)
7636 {

Callers

nothing calls this directly

Calls 6

starts_withFunction · 0.85
strequalFunction · 0.85
xpath_nodeClass · 0.85
nameMethod · 0.80
push_backMethod · 0.80
typeMethod · 0.45

Tested by

no test coverage detected