summaryrefslogtreecommitdiffstats
path: root/src/PatchageModule.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-12-03 21:45:57 +0000
committerDavid Robillard <d@drobilla.net>2011-12-03 21:45:57 +0000
commit74a3eb19f586e3548f59bb9ff9137703cdc45de8 (patch)
tree07d9070e88dd46e7b536b7b8aeed2e248ffc00b1 /src/PatchageModule.cpp
parent0654b5d4017b2dbd605ea9d7567f220ceeca44e1 (diff)
downloadpatchage-74a3eb19f586e3548f59bb9ff9137703cdc45de8.tar.gz
patchage-74a3eb19f586e3548f59bb9ff9137703cdc45de8.tar.bz2
patchage-74a3eb19f586e3548f59bb9ff9137703cdc45de8.zip
Don't expose canvas data structures.
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@3775 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/PatchageModule.cpp')
-rw-r--r--src/PatchageModule.cpp12
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;
+}