summaryrefslogtreecommitdiffstats
path: root/src/libs/shared/Builder.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-08-17 23:00:34 +0000
committerDavid Robillard <d@drobilla.net>2008-08-17 23:00:34 +0000
commit14401d11e598651e7caf39cce884362e58ef5941 (patch)
tree05b2c57b1f55640149ba850a2f9f1fda175dccb8 /src/libs/shared/Builder.cpp
parent9938fac4b15f8939c9056c16a3a7662575af52e1 (diff)
downloadingen-14401d11e598651e7caf39cce884362e58ef5941.tar.gz
ingen-14401d11e598651e7caf39cce884362e58ef5941.tar.bz2
ingen-14401d11e598651e7caf39cce884362e58ef5941.zip
Copy/paste of connections.
git-svn-id: http://svn.drobilla.net/lad/ingen@1426 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/shared/Builder.cpp')
-rw-r--r--src/libs/shared/Builder.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/libs/shared/Builder.cpp b/src/libs/shared/Builder.cpp
index 83e0f3d2..2b5e954c 100644
--- a/src/libs/shared/Builder.cpp
+++ b/src/libs/shared/Builder.cpp
@@ -41,24 +41,27 @@ Builder::build(SharedPtr<const GraphObject> object)
SharedPtr<const Patch> patch = PtrCast<const Patch>(object);
if (patch) {
if (patch->path() != "/")
- _interface.new_patch(patch->path() + "_copy", patch->internal_polyphony());
+ _interface.new_patch(patch->path(), patch->internal_polyphony());
build_object(object);
for (Patch::Connections::const_iterator i = patch->connections().begin();
- i != patch->connections().end(); ++i)
+ i != patch->connections().end(); ++i) {
+ cout << "BUILDER CONNECTION: " <<(*i)->src_port_path()
+ << " -> " << (*i)->dst_port_path() << endl;
_interface.connect((*i)->src_port_path(), (*i)->dst_port_path());
+ }
return;
}
SharedPtr<const Node> node = PtrCast<const Node>(object);
if (node) {
- _interface.new_node(node->path() + "_copy", node->plugin()->uri());
+ _interface.new_node(node->path(), node->plugin()->uri());
build_object(object);
return;
}
SharedPtr<const Port> port = PtrCast<const Port>(object);
if (port) {
- _interface.new_port(port->path() + "_copy", port->index(), port->type().uri(), !port->is_input());
+ _interface.new_port(port->path(), port->index(), port->type().uri(), !port->is_input());
build_object(object);
return;
}
@@ -70,11 +73,11 @@ Builder::build_object(SharedPtr<const GraphObject> object)
{
for (GraphObject::Variables::const_iterator i = object->variables().begin();
i != object->variables().end(); ++i)
- _interface.set_variable(object->path() + "_copy", i->first, i->second);
+ _interface.set_variable(object->path(), i->first, i->second);
for (GraphObject::Properties::const_iterator i = object->properties().begin();
i != object->properties().end(); ++i)
- _interface.set_property(object->path() + "_copy", i->first, i->second);
+ _interface.set_property(object->path(), i->first, i->second);
}