summaryrefslogtreecommitdiffstats
path: root/src/engine/ObjectSender.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-27 23:21:34 +0000
committerDavid Robillard <d@drobilla.net>2009-05-27 23:21:34 +0000
commit2f595631859574bfa7779ebb42f42b8590f5424c (patch)
treec91c0cddcd93af991161c6cde4eceaaf45c5c8d5 /src/engine/ObjectSender.cpp
parent20ff9af76b21b751ac29b354cf557e86b69c52f7 (diff)
downloadingen-2f595631859574bfa7779ebb42f42b8590f5424c.tar.gz
ingen-2f595631859574bfa7779ebb42f42b8590f5424c.tar.bz2
ingen-2f595631859574bfa7779ebb42f42b8590f5424c.zip
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
Diffstat (limited to 'src/engine/ObjectSender.cpp')
-rw-r--r--src/engine/ObjectSender.cpp36
1 files changed, 10 insertions, 26 deletions
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<NodeImpl*>::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<PatchImpl*>(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<const AudioBuffer*>(port->buffer(0))->value_at(0);
- //cerr << port->path() << " sending default value " << default_value << endl;
+ const Sample& value = dynamic_cast<const AudioBuffer*>(port->buffer(0))->value_at(0);
client->set_port_value(port->path(), value);
}