MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / traverse_

Function traverse_

src/ifcparse/IfcParse.cpp:1805–1818  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1803};
1804
1805void traverse_(IfcUtil::IfcBaseClass* instance, std::set<IfcUtil::IfcBaseClass*>& visited, traversal_recorder& list, int level, int max_level) {
1806 if (visited.find(instance) != visited.end()) {
1807 return;
1808 }
1809 visited.insert(instance);
1810 list.push_back(level, instance);
1811
1812 if (level >= max_level && max_level > 0) {
1813 return;
1814 }
1815
1816 traversal_visitor visit(visited, list, level + 1, max_level);
1817 apply_individual_instance_visitor(instance).apply(visit);
1818}
1819
1820void traversal_visitor::operator()(IfcUtil::IfcBaseClass* inst, int /* index */) {
1821 traverse_(inst, visited_, list_, level_, max_level_);

Callers 3

operator()Method · 0.85
traverseMethod · 0.85

Calls 6

push_backMethod · 0.80
findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
applyMethod · 0.45

Tested by

no test coverage detected