MCPcopy Create free account
hub / github.com/aldelaro5/dolphin-memory-engine / findNode

Method findNode

Source/Structs/StructTreeNode.cpp:303–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301}
302
303StructTreeNode* StructTreeNode::findNode(QString nameSpace, bool returnDeepest)
304{
305 StructTreeNode* cur_node = this;
306 while (cur_node->getParent() != nullptr)
307 cur_node = cur_node->getParent();
308
309 QStringList names = nameSpace.split("::");
310 for (QString name : names)
311 {
312 bool childFound = false;
313 for (StructTreeNode* child : cur_node->getChildren())
314 {
315 if (child->getName() == name)
316 {
317 childFound = true;
318 cur_node = child;
319 break;
320 }
321 }
322 if (!childFound)
323 {
324 if (returnDeepest)
325 return cur_node;
326 else
327 return nullptr;
328 }
329 }
330 return cur_node;
331}
332
333StructTreeNode* StructTreeNode::findDeepestAvailableNode(QString nameSpace)
334{

Callers 4

replaceDefMethod · 0.80

Calls 1

getParentMethod · 0.45

Tested by

no test coverage detected