diff options
author | David Robillard <d@drobilla.net> | 2010-12-15 21:18:34 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-12-15 21:18:34 +0000 |
commit | a03527da35adb7e09fec8bac1c51a09f9c095455 (patch) | |
tree | 35386661214e97f8b16394248fe0004c698c9191 /src/PatchageCanvas.cpp | |
parent | ce028e8e44e1159975221b74bcf6d00c11367928 (diff) | |
download | patchage-a03527da35adb7e09fec8bac1c51a09f9c095455.tar.gz patchage-a03527da35adb7e09fec8bac1c51a09f9c095455.tar.bz2 patchage-a03527da35adb7e09fec8bac1c51a09f9c095455.zip |
Fix compilation with --jack-dbus (fix ticket #604).
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@2717 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/PatchageCanvas.cpp')
-rw-r--r-- | src/PatchageCanvas.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/PatchageCanvas.cpp b/src/PatchageCanvas.cpp index 0b5103f..d565068 100644 --- a/src/PatchageCanvas.cpp +++ b/src/PatchageCanvas.cpp @@ -98,6 +98,24 @@ PatchageCanvas::find_port(const PortID& id) } +boost::shared_ptr<PatchagePort> +PatchageCanvas::find_port_by_name(const std::string& client_name, + const std::string& port_name) +{ + const ModuleIndex::const_iterator i = _module_index.find(client_name); + if (i == _module_index.end()) + return boost::shared_ptr<PatchagePort>(); + + for (ModuleIndex::const_iterator j = i; j != _module_index.end() && j->first == client_name; ++j) { + SharedPtr<PatchagePort> port = PtrCast<PatchagePort>(j->second->get_port(port_name)); + if (port) + return port; + } + + return boost::shared_ptr<PatchagePort>(); +} + + void PatchageCanvas::connect(boost::shared_ptr<Connectable> port1, boost::shared_ptr<Connectable> port2) { |