MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / LoadLayout

Method LoadLayout

Source/EffectChain.cpp:560–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

558}
559
560void EffectChain::LoadLayout(const ofxJSONElement& moduleInfo)
561{
562 mModuleSaveData.LoadString("target", moduleInfo);
563 mModuleSaveData.LoadInt("widecount", moduleInfo, 5, 1, 50, true);
564 mModuleSaveData.LoadBool("showspawnlist", moduleInfo, true);
565
566 const ofxJSONElement& effects = moduleInfo["effects"];
567
568 assert(mEffects.size() == effects.size());
569 for (int i = 0; i < mEffects.size(); ++i)
570 {
571 try
572 {
573 std::string type = effects[i]["type"].asString();
574 assert(mEffects[i]->GetType() == type);
575 mEffects[i]->LoadLayoutBase(effects[i]);
576 }
577 catch (Json::LogicError& e)
578 {
579 TheSynth->LogEvent(__PRETTY_FUNCTION__ + std::string(" json error: ") + e.what(), kLogEventType_Error);
580 }
581 }
582
583 SetUpFromSaveData();
584}
585
586void EffectChain::SetUpFromSaveData()
587{

Callers

nothing calls this directly

Calls 7

LoadStringMethod · 0.80
LoadIntMethod · 0.80
LoadBoolMethod · 0.80
sizeMethod · 0.80
LoadLayoutBaseMethod · 0.80
LogEventMethod · 0.80
GetTypeMethod · 0.45

Tested by

no test coverage detected