MCPcopy Create free account
hub / github.com/VCVRack/Rack / getCablesOnPort

Method getCablesOnPort

src/app/RackWidget.cpp:1579–1591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1577}
1578
1579std::vector<CableWidget*> RackWidget::getCablesOnPort(PortWidget* port) {
1580 assert(port);
1581 std::vector<CableWidget*> cws;
1582 for (widget::Widget* w : internal->plugContainer->children) {
1583 PlugWidget* plug = dynamic_cast<PlugWidget*>(w);
1584 assert(plug);
1585 CableWidget* cw = plug->getCable();
1586 PortWidget* port2 = cw->getPort(plug->getType());
1587 if (port2 == port)
1588 cws.push_back(cw);
1589 }
1590 return cws;
1591}
1592
1593std::vector<CableWidget*> RackWidget::getCompleteCablesOnPort(PortWidget* port) {
1594 assert(port);

Callers

nothing calls this directly

Calls 3

getPortMethod · 0.80
getTypeMethod · 0.80
getCableMethod · 0.45

Tested by

no test coverage detected