From 2f595631859574bfa7779ebb42f42b8590f5424c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 27 May 2009 23:21:34 +0000 Subject: Remove 'property' vs 'variable' dichotomy in favour of 'meta objects' (to match serialisation). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2016 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/ObjectSender.cpp | 36 ++++++++++-------------------------- 1 file changed, 10 insertions(+), 26 deletions(-) (limited to 'src/engine/ObjectSender.cpp') diff --git a/src/engine/ObjectSender.cpp b/src/engine/ObjectSender.cpp index 9bf70cbf..072d6c52 100644 --- a/src/engine/ObjectSender.cpp +++ b/src/engine/ObjectSender.cpp @@ -62,14 +62,10 @@ ObjectSender::send_patch(ClientInterface* client, const PatchImpl* patch, bool r if (bundle) client->transfer_begin(); - client->put(patch->path(), patch->properties()); + client->put(patch->meta_uri(), patch->meta().properties()); + client->put(patch->path(), patch->properties()); if (recursive) { - // Send variables - 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); - // Send nodes for (List::const_iterator j = patch->nodes().begin(); j != patch->nodes().end(); ++j) { @@ -113,12 +109,7 @@ ObjectSender::send_node(ClientInterface* client, const NodeImpl* node, bool recu if (bundle) client->transfer_begin(); - client->put(node->path(), node->variables()); - - // Send variables - const GraphObjectImpl::Properties& prop = node->variables(); - for (GraphObjectImpl::Properties::const_iterator j = prop.begin(); j != prop.end(); ++j) - client->set_variable(node->path(), (*j).first, (*j).second); + client->put(node->path(), node->properties()); if (recursive) { // Send ports @@ -139,26 +130,19 @@ ObjectSender::send_port(ClientInterface* client, const PortImpl* port, bool bund if (bundle) client->bundle_begin(); - client->put(port->path(), port->properties()); - 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 variables - 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); + if (graph_parent) + client->put(port->meta_uri(), port->meta().properties()); + + client->put(port->path(), port->properties()); - // Send properties - const GraphObjectImpl::Properties& prop = port->properties(); - for (GraphObjectImpl::Properties::const_iterator j = prop.begin(); j != prop.end(); ++j) - client->set_property(port->path(), (*j).first, (*j).second); + if (graph_parent && graph_parent->internal_polyphony() > 1) + client->set_property(port->meta_uri(), "ingen:polyphonic", bool(port->polyphonic())); // Send control value if (port->type() == DataType::CONTROL) { - const Sample value = dynamic_cast(port->buffer(0))->value_at(0); - //cerr << port->path() << " sending default value " << default_value << endl; + const Sample& value = dynamic_cast(port->buffer(0))->value_at(0); client->set_port_value(port->path(), value); } -- cgit v1.2.1