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

Method restoreMethodsRecursivly

Source/Lua/Methods/CtrlrLuaMethodManager.cpp:229–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229void CtrlrLuaMethodManager::restoreMethodsRecursivly(const ValueTree &savedState, const Uuid parentUuid)
230{
231 for (int i=0; i<savedState.getNumChildren(); i++)
232 {
233 if (savedState.getChild(i).hasType(Ids::luaMethodGroup))
234 {
235 restoreMethodsRecursivly (savedState.getChild(i), parentUuid);
236 }
237
238 if (savedState.getChild(i).hasType(Ids::luaMethod))
239 {
240 restoreMethod (savedState.getChild(i), savedState.getProperty(Ids::uuid).toString());
241 }
242 }
243}
244
245void CtrlrLuaMethodManager::addMethod (ValueTree groupToAddTo, const String &methodName, const String &initialCode, const String &linkedToProperty, const Uuid methodUid, const bool forceIfAlreadyExists)
246{

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected