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

Method SetUpPatchCables

Source/IDrawableModule.cpp:611–629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

609}
610
611void IDrawableModule::SetUpPatchCables(std::string targets)
612{
613 PatchCableSource* source = GetPatchCableSource();
614 assert(source != nullptr);
615 std::vector<std::string> targetVec = ofSplitString(targets, ",");
616 if (targetVec.empty() || targets == "")
617 {
618 source->Clear();
619 }
620 else
621 {
622 for (int i = 0; i < targetVec.size(); ++i)
623 {
624 IClickable* target = dynamic_cast<IClickable*>(TheSynth->FindModule(targetVec[i]));
625 if (target)
626 source->AddPatchCable(target);
627 }
628 }
629}
630
631void IDrawableModule::AddPatchCableSource(PatchCableSource* source)
632{

Callers

nothing calls this directly

Calls 6

ofSplitStringFunction · 0.85
emptyMethod · 0.80
sizeMethod · 0.80
AddPatchCableMethod · 0.80
ClearMethod · 0.45
FindModuleMethod · 0.45

Tested by

no test coverage detected