diff options
author | David Robillard <d@drobilla.net> | 2009-05-27 23:21:34 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-05-27 23:21:34 +0000 |
commit | 2f595631859574bfa7779ebb42f42b8590f5424c (patch) | |
tree | c91c0cddcd93af991161c6cde4eceaaf45c5c8d5 /src/engine/QueuedEngineInterface.cpp | |
parent | 20ff9af76b21b751ac29b354cf557e86b69c52f7 (diff) | |
download | ingen-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/QueuedEngineInterface.cpp')
-rw-r--r-- | src/engine/QueuedEngineInterface.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/src/engine/QueuedEngineInterface.cpp b/src/engine/QueuedEngineInterface.cpp index 7c9c2c1a..4b2926e7 100644 --- a/src/engine/QueuedEngineInterface.cpp +++ b/src/engine/QueuedEngineInterface.cpp @@ -152,11 +152,15 @@ QueuedEngineInterface::bundle_end() void -QueuedEngineInterface::put(const Path& path, +QueuedEngineInterface::put(const URI& uri, const Resource::Properties& properties) { + size_t hash = uri.find("#"); + bool meta = (hash != string::npos); + Path path(meta ? (string("/") + uri.chop_start("#")) : uri.str()); + typedef Resource::Properties::const_iterator iterator; - cerr << "ENGINE PUT " << path << " {" << endl; + cerr << "ENGINE PUT " << path << " (" << path << ") {" << endl; for (iterator i = properties.begin(); i != properties.end(); ++i) cerr << "\t" << i->first << " = " << i->second << " :: " << i->second.type() << endl; cerr << "}" << endl; @@ -255,20 +259,14 @@ QueuedEngineInterface::midi_learn(const Path& node_path) void -QueuedEngineInterface::set_variable(const URI& path, - const URI& predicate, - const Atom& value) -{ - push_queued(new SetMetadataEvent(_engine, _responder, now(), false, path, predicate, value)); -} - - -void -QueuedEngineInterface::set_property(const URI& path, +QueuedEngineInterface::set_property(const URI& uri, const URI& predicate, const Atom& value) { - push_queued(new SetMetadataEvent(_engine, _responder, now(), true, path, predicate, value)); + size_t hash = uri.find("#"); + bool meta = (hash != string::npos); + Path path = meta ? (string("/") + path.chop_start("/")) : uri.str(); + push_queued(new SetMetadataEvent(_engine, _responder, now(), meta, path, predicate, value)); } // Requests // |