MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / findGroupRecursive

Method findGroupRecursive

Source/Lua/Methods/CtrlrLuaMethodManager.cpp:378–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

376}
377
378ValueTree CtrlrLuaMethodManager::findGroupRecursive(ValueTree treeToSearch, const Uuid &groupUuid)
379{
380 for (int i=0; i<treeToSearch.getNumChildren(); i++)
381 {
382 if (treeToSearch.getChild(i).hasType(Ids::luaMethodGroup))
383 {
384 if (treeToSearch.getChild(i).getProperty(Ids::uuid) == groupUuid.toString())
385 {
386 return (treeToSearch.getChild(i));
387 }
388 else
389 {
390 ValueTree t = findGroupRecursive(treeToSearch.getChild(i), groupUuid);
391 if (t.isValid())
392 {
393 return (t);
394 }
395 }
396 }
397 }
398 return (ValueTree());
399}
400
401const String CtrlrLuaMethodManager::cleanupMethod(XmlElement *methodElement, const String &methodName)
402{

Callers

nothing calls this directly

Calls 5

getNumChildrenMethod · 0.80
getChildMethod · 0.45
getPropertyMethod · 0.45
toStringMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected