summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/ObjectStore.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-08-15 23:34:41 +0000
committerDavid Robillard <d@drobilla.net>2008-08-15 23:34:41 +0000
commitab2aa4d4922ab1a62b7a43013d09b2d9d144b3c5 (patch)
tree9e235f0c3b7a355e3cc661720359cd3d9eb18fb9 /src/libs/engine/ObjectStore.cpp
parent4d5a589570a65d508170c59b4c738b441e216a93 (diff)
downloadingen-ab2aa4d4922ab1a62b7a43013d09b2d9d144b3c5.tar.gz
ingen-ab2aa4d4922ab1a62b7a43013d09b2d9d144b3c5.tar.bz2
ingen-ab2aa4d4922ab1a62b7a43013d09b2d9d144b3c5.zip
Push serialiser down into core ('world').
HTTP access to patches (serialised on demand). git-svn-id: http://svn.drobilla.net/lad/ingen@1393 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/ObjectStore.cpp')
-rw-r--r--src/libs/engine/ObjectStore.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/libs/engine/ObjectStore.cpp b/src/libs/engine/ObjectStore.cpp
index 052200fd..3cecb338 100644
--- a/src/libs/engine/ObjectStore.cpp
+++ b/src/libs/engine/ObjectStore.cpp
@@ -72,11 +72,33 @@ ObjectStore::find_object(const Path& path)
}
+ObjectStore::Objects::const_iterator
+ObjectStore::children_begin(SharedPtr<Shared::GraphObject> o) const
+{
+ Objects::const_iterator parent = _objects.find(o->path());
+ assert(parent != _objects.end());
+ ++parent;
+ return parent;
+}
+
+
+ObjectStore::Objects::const_iterator
+ObjectStore::children_end(SharedPtr<Shared::GraphObject> o) const
+{
+ Objects::const_iterator parent = _objects.find(o->path());
+ assert(parent != _objects.end());
+ return _objects.find_descendants_end(parent);
+}
+
+
/** Add an object to the store. Not realtime safe.
*/
void
-ObjectStore::add(GraphObjectImpl* o)
+ObjectStore::add(GraphObject* obj)
{
+ GraphObjectImpl* o = dynamic_cast<GraphObjectImpl*>(obj);
+ assert(o);
+
assert(ThreadManager::current_thread_id() == THREAD_PRE_PROCESS);
if (_objects.find(o->path()) != _objects.end()) {