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

Method UpdateRoutingModules

Source/Push2Control.cpp:2123–2148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2121}
2122
2123void Push2Control::UpdateRoutingModules()
2124{
2125 mRoutingInputModules.clear();
2126 mRoutingOutputModules.clear();
2127
2128 std::vector<IDrawableModule*> modules;
2129 TheSynth->GetAllModules(modules);
2130 for (auto* module : modules)
2131 {
2132 for (auto* source : module->GetPatchCableSources())
2133 {
2134 if (source->GetTarget() == mDisplayModule)
2135 mRoutingInputModules.push_back(Routing(module, module->GetPatchCableSource()->GetColor()));
2136 }
2137 }
2138
2139 for (auto* source : mDisplayModule->GetPatchCableSources())
2140 {
2141 for (auto* cable : source->GetPatchCables())
2142 {
2143 IDrawableModule* target = dynamic_cast<IDrawableModule*>(cable->GetTarget());
2144 if (target != nullptr)
2145 mRoutingOutputModules.push_back(Routing(target, cable->GetOwner()->GetColor()));
2146 }
2147 }
2148}
2149
2150bool Push2Control::IsIgnorableModule(IDrawableModule* module)
2151{

Callers

nothing calls this directly

Calls 7

RoutingClass · 0.85
GetPatchCableSourcesMethod · 0.80
GetAllModulesMethod · 0.45
GetTargetMethod · 0.45
GetColorMethod · 0.45
GetPatchCableSourceMethod · 0.45
GetOwnerMethod · 0.45

Tested by

no test coverage detected