summaryrefslogtreecommitdiffstats
path: root/src/engine/QueuedEngineInterface.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-28 15:57:14 +0000
committerDavid Robillard <d@drobilla.net>2009-05-28 15:57:14 +0000
commitee3bba21b4f2ea2e0e03f93bc9eded6681b9b482 (patch)
tree185987a38a9737a72840d41c5d5bb525f3d49aea /src/engine/QueuedEngineInterface.cpp
parenteae3b1c1e100fc1b705a2d664cffae4aa5802568 (diff)
downloadingen-ee3bba21b4f2ea2e0e03f93bc9eded6681b9b482.tar.gz
ingen-ee3bba21b4f2ea2e0e03f93bc9eded6681b9b482.tar.bz2
ingen-ee3bba21b4f2ea2e0e03f93bc9eded6681b9b482.zip
Create objects via SetMetadataEvent.
Fix subpatch creation. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2025 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/QueuedEngineInterface.cpp')
-rw-r--r--src/engine/QueuedEngineInterface.cpp24
1 files changed, 2 insertions, 22 deletions
diff --git a/src/engine/QueuedEngineInterface.cpp b/src/engine/QueuedEngineInterface.cpp
index 7c989723..30cc1072 100644
--- a/src/engine/QueuedEngineInterface.cpp
+++ b/src/engine/QueuedEngineInterface.cpp
@@ -166,27 +166,7 @@ QueuedEngineInterface::put(const URI& uri,
cerr << "\t" << i->first << " = " << i->second << " :: " << i->second.type() << endl;
cerr << "}" << endl;
- bool is_patch = false, is_node = false, is_port = false, is_output = false;
- DataType data_type(DataType::UNKNOWN);
- ResourceImpl::type(properties, is_patch, is_node, is_port, is_output, data_type);
-
- // PutEvent
-
- if (is_patch) {
- uint32_t poly = 1;
- iterator p = properties.find("ingen:polyphony");
- if (p != properties.end() && p->second.is_valid() && p->second.type() == Atom::INT)
- poly = p->second.get_int32();
- push_queued(new CreatePatchEvent(
- _engine, _responder, now(), path, poly, properties));
- } else if (is_node) {
- const iterator p = properties.find("rdf:instanceOf");
- push_queued(new CreateNodeEvent(
- _engine, _responder, now(), path, p->second.get_uri(), true, properties));
- } else if (is_port) {
- push_queued(new CreatePortEvent(
- _engine, _responder, now(), path, data_type.uri(), is_output, this, properties));
- }
+ push_queued(new SetMetadataEvent(_engine, _responder, now(), this, meta, path, properties));
}
@@ -271,7 +251,7 @@ QueuedEngineInterface::set_property(const URI& uri,
Path path = meta ? (string("/") + path.chop_start("/")) : uri.str();
Resource::Properties properties;
properties.insert(make_pair(predicate, value));
- push_queued(new SetMetadataEvent(_engine, _responder, now(), meta, path, properties));
+ push_queued(new SetMetadataEvent(_engine, _responder, now(), this, meta, path, properties));
}
// Requests //