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

Method step_push

Tools/EditorFramework/pugixml.cpp:8360–8389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8358 }
8359
8360 void step_push(xpath_node_set_raw& ns, const xml_attribute& a, const xml_node& parent, xpath_allocator* alloc)
8361 {
8362 if (!a)
8363 return;
8364
8365 const char_t* name = a.name();
8366
8367 // There are no attribute nodes corresponding to attributes that declare namespaces
8368 // That is, "xmlns:..." or "xmlns"
8369 if (starts_with(name, PUGIXML_TEXT("xmlns")) && (name[5] == 0 || name[5] == ':'))
8370 return;
8371
8372 switch (_test)
8373 {
8374 case nodetest_name:
8375 if (strequal(name, _data.nodetest))
8376 ns.push_back(xpath_node(a, parent), alloc);
8377 break;
8378
8379 case nodetest_type_node:
8380 case nodetest_all: ns.push_back(xpath_node(a, parent), alloc); break;
8381
8382 case nodetest_all_in_namespace:
8383 if (starts_with(name, _data.nodetest))
8384 ns.push_back(xpath_node(a, parent), alloc);
8385 break;
8386
8387 default:;
8388 }
8389 }
8390
8391 void step_push(xpath_node_set_raw& ns, const xml_node& n, xpath_allocator* alloc)
8392 {

Callers

nothing calls this directly

Calls 6

starts_withFunction · 0.70
strequalFunction · 0.70
xpath_nodeClass · 0.70
nameMethod · 0.45
push_backMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected