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

Method traverse

Source/ThirdParty/pugixml/pugixml.cpp:5420–5466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5418 }
5419
5420 PUGI__FN bool xml_node::traverse(xml_tree_walker& walker)
5421 {
5422 walker._depth = -1;
5423
5424 xml_node arg_begin = *this;
5425 if (!walker.begin(arg_begin)) return false;
5426
5427 xml_node cur = first_child();
5428
5429 if (cur)
5430 {
5431 ++walker._depth;
5432
5433 do
5434 {
5435 xml_node arg_for_each = cur;
5436 if (!walker.for_each(arg_for_each))
5437 return false;
5438
5439 if (cur.first_child())
5440 {
5441 ++walker._depth;
5442 cur = cur.first_child();
5443 }
5444 else if (cur.next_sibling())
5445 cur = cur.next_sibling();
5446 else
5447 {
5448 // Borland C++ workaround
5449 while (!cur.next_sibling() && cur != *this && !cur.parent().empty())
5450 {
5451 --walker._depth;
5452 cur = cur.parent();
5453 }
5454
5455 if (cur != *this)
5456 cur = cur.next_sibling();
5457 }
5458 }
5459 while (cur && cur != *this);
5460 }
5461
5462 assert(walker._depth == -1);
5463
5464 xml_node arg_end = *this;
5465 return walker.end(arg_end);
5466 }
5467
5468 PUGI__FN size_t xml_node::hash_value() const
5469 {

Callers 1

visitSelectionMethod · 0.80

Calls 6

first_childMethod · 0.80
next_siblingMethod · 0.80
parentMethod · 0.80
beginMethod · 0.45
emptyMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected