summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-12-04 07:25:09 +0000
committerDavid Robillard <d@drobilla.net>2011-12-04 07:25:09 +0000
commita62e60005af175ef70b649512d7433e1563576b9 (patch)
tree87b72bce9c4de5adab5d25f29975301f6c139a50 /src
parentf8b71cd0d19b79d6bffee9e119677502552fcb49 (diff)
downloadingen-a62e60005af175ef70b649512d7433e1563576b9.tar.gz
ingen-a62e60005af175ef70b649512d7433e1563576b9.tar.bz2
ingen-a62e60005af175ef70b649512d7433e1563576b9.zip
Move module ports down to C level.
Add STL-style port iteration API to Module. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3795 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/gui/NodeModule.cpp6
-rw-r--r--src/gui/PatchCanvas.cpp6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index e9918068..188925c5 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -153,7 +153,7 @@ NodeModule::show_human_names(bool b)
set_label(node()->symbol().c_str());
}
- for (Ports::const_iterator i = ports().begin(); i != ports().end(); ++i) {
+ for (iterator i = begin(); i != end(); ++i) {
Ingen::GUI::Port* const port = dynamic_cast<Ingen::GUI::Port*>(*i);
Glib::ustring label(port->model()->symbol().c_str());
if (b) {
@@ -195,7 +195,7 @@ NodeModule::value_changed(uint32_t index, const Atom& value)
void
NodeModule::plugin_changed()
{
- for (Ports::const_iterator p = ports().begin(); p != ports().end(); ++p)
+ for (iterator p = begin(); p !=end(); ++p)
dynamic_cast<Ingen::GUI::Port*>(*p)->update_metadata();
}
@@ -276,7 +276,7 @@ NodeModule::new_port_view(SharedPtr<const PortModel> port)
Port*
NodeModule::port(boost::shared_ptr<const PortModel> model)
{
- for (Ports::const_iterator p = ports().begin(); p != ports().end(); ++p) {
+ for (iterator p = begin(); p != end(); ++p) {
Port* const port = dynamic_cast<Port*>(*p);
if (port->model() == model)
return port;
diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp
index 25df6d61..d61b3969 100644
--- a/src/gui/PatchCanvas.cpp
+++ b/src/gui/PatchCanvas.cpp
@@ -454,13 +454,13 @@ PatchCanvas::get_port_view(SharedPtr<PortModel> port)
if (module) {
PatchPortModule* ppm = dynamic_cast<PatchPortModule*>(module);
return ppm
- ? *ppm->ports().begin()
+ ? *ppm->begin()
: dynamic_cast<FlowCanvas::Port*>(module);
} else {
module = dynamic_cast<NodeModule*>(_views[port->parent()]);
if (module) {
- for (Module::Ports::const_iterator p = module->ports().begin();
- p != module->ports().end(); ++p) {
+ for (Module::iterator p = module->begin();
+ p != module->end(); ++p) {
GUI::Port* pv = dynamic_cast<GUI::Port*>(*p);
if (pv && pv->model() == port)
return pv;