From 698c38587bd4f0133a132dc363098ff8298ec47b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 11 May 2009 18:05:24 +0000 Subject: * New ontology. * Display human names on patch ports on creation, if enabled. * Fix copy/paste of subpatches. * Split properties into "properties" (class properties) and "variables" (instance properties). * Names are kind of a legacy leftover... * Remove special set poly / enable / etc events in favour of just setting properties (less API, extensible, RDF compatible). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1973 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/ObjectSender.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src/engine/ObjectSender.cpp') diff --git a/src/engine/ObjectSender.cpp b/src/engine/ObjectSender.cpp index 81759fae..e261bc97 100644 --- a/src/engine/ObjectSender.cpp +++ b/src/engine/ObjectSender.cpp @@ -62,14 +62,14 @@ ObjectSender::send_patch(ClientInterface* client, const PatchImpl* patch, bool r client->transfer_begin(); client->new_patch(patch->path(), patch->internal_polyphony()); - client->set_property(patch->path(), "ingen:polyphonic", patch->polyphonic()); + client->set_variable(patch->path(), "ingen:polyphonic", bool(patch->polyphonic())); // Send variable - const GraphObjectImpl::Variables& data = patch->variables(); - for (GraphObjectImpl::Variables::const_iterator j = data.begin(); j != data.end(); ++j) + const GraphObjectImpl::Properties& data = patch->variables(); + for (GraphObjectImpl::Properties::const_iterator j = data.begin(); j != data.end(); ++j) client->set_variable(patch->path(), (*j).first, (*j).second); - client->set_property(patch->path(), "ingen:enabled", (bool)patch->enabled()); + client->set_variable(patch->path(), "ingen:enabled", (bool)patch->enabled()); if (recursive) { @@ -119,11 +119,11 @@ ObjectSender::send_node(ClientInterface* client, const NodeImpl* node, bool recu client->transfer_begin(); client->new_node(node->path(), node->plugin()->uri()); - client->set_property(node->path(), "ingen:polyphonic", node->polyphonic()); + client->set_variable(node->path(), "ingen:polyphonic", bool(node->polyphonic())); // Send variables - const GraphObjectImpl::Variables& data = node->variables(); - for (GraphObjectImpl::Variables::const_iterator j = data.begin(); j != data.end(); ++j) + const GraphObjectImpl::Properties& data = node->variables(); + for (GraphObjectImpl::Properties::const_iterator j = data.begin(); j != data.end(); ++j) client->set_variable(node->path(), (*j).first, (*j).second); // Send properties @@ -151,11 +151,13 @@ ObjectSender::send_port(ClientInterface* client, const PortImpl* port, bool bund client->bundle_begin(); client->new_port(port->path(), port->type().uri(), port->index(), port->is_output()); - client->set_property(port->path(), "ingen:polyphonic", port->polyphonic()); + PatchImpl* graph_parent = dynamic_cast(port->parent_node()); + if (graph_parent && graph_parent->internal_polyphony() > 1) + client->set_variable(port->path(), "ingen:polyphonic", bool(port->polyphonic())); // Send variable - const GraphObjectImpl::Variables& data = port->variables(); - for (GraphObjectImpl::Variables::const_iterator j = data.begin(); j != data.end(); ++j) + const GraphObjectImpl::Properties& data = port->variables(); + for (GraphObjectImpl::Properties::const_iterator j = data.begin(); j != data.end(); ++j) client->set_variable(port->path(), (*j).first, (*j).second); // Send properties -- cgit v1.2.1