diff options
Diffstat (limited to 'src/PatchageModule.cpp')
-rw-r--r-- | src/PatchageModule.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/PatchageModule.cpp b/src/PatchageModule.cpp index fd7d0ef..85538cd 100644 --- a/src/PatchageModule.cpp +++ b/src/PatchageModule.cpp @@ -148,3 +148,15 @@ PatchageModule::menu_disconnect_all() for (Ports::iterator p = _ports.begin(); p != _ports.end(); ++p) (*p)->disconnect_all(); } + +PatchagePort* +PatchageModule::get_port(const std::string& name) +{ + for (Ports::const_iterator p = _ports.begin(); p != _ports.end(); ++p) { + if ((*p)->get_label() == name) { + return dynamic_cast<PatchagePort*>(*p); + } + } + + return NULL; +} |