diff options
author | David Robillard <d@drobilla.net> | 2007-10-10 05:45:04 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-10-10 05:45:04 +0000 |
commit | c7f3a28390e651e03a68b664086351788a6a2d73 (patch) | |
tree | e4e7037981a876c8e6c69414f6662b0682995212 /src/libs/engine/ObjectStore.cpp | |
parent | 670bf40134c1aa7c1ff175ff8acd9dbed7b9ab41 (diff) | |
download | ingen-c7f3a28390e651e03a68b664086351788a6a2d73.tar.gz ingen-c7f3a28390e651e03a68b664086351788a6a2d73.tar.bz2 ingen-c7f3a28390e651e03a68b664086351788a6a2d73.zip |
Fix recursive patch problems (all objects recursively appearing as direct child of root).
Use slightly more human friendly names for blank nodes in patch files.
Fix memory management semantics of engine side objects (fix crash on subpatch delete).
Make Raul::Table a boost::noncopyable; related changes trickled down from that.
git-svn-id: http://svn.drobilla.net/lad/ingen@865 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/ObjectStore.cpp')
-rw-r--r-- | src/libs/engine/ObjectStore.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/libs/engine/ObjectStore.cpp b/src/libs/engine/ObjectStore.cpp index 2eff21b0..e8fa3f4d 100644 --- a/src/libs/engine/ObjectStore.cpp +++ b/src/libs/engine/ObjectStore.cpp @@ -113,7 +113,7 @@ ObjectStore::add(const Table<Path, SharedPtr<Shared::GraphObject> >& table) * Returned is a vector containing all descendants of the object removed * including the object itself, in lexicographically sorted order by Path. */ -Table<Path, SharedPtr<Shared::GraphObject> > +SharedPtr< Table<Path, SharedPtr<Shared::GraphObject> > > ObjectStore::remove(const Path& path) { return remove(_objects.find(path)); @@ -125,7 +125,7 @@ ObjectStore::remove(const Path& path) * Returned is a vector containing all descendants of the object removed * including the object itself, in lexicographically sorted order by Path. */ -Table<Path, SharedPtr<Shared::GraphObject> > +SharedPtr< Table<Path, SharedPtr<Shared::GraphObject> > > ObjectStore::remove(Objects::iterator object) { assert(ThreadManager::current_thread_id() == THREAD_PRE_PROCESS); @@ -133,8 +133,10 @@ ObjectStore::remove(Objects::iterator object) if (object != _objects.end()) { Objects::iterator descendants_end = _objects.find_descendants_end(object); //cout << "[ObjectStore] Removing " << object->first << " {" << endl; - Table<Path, SharedPtr<Shared::GraphObject> > removed = _objects.yank(object, descendants_end); - for (Objects::iterator i = removed.begin(); i != removed.end(); ++i) { + SharedPtr< Table<Path, SharedPtr<Shared::GraphObject> > > removed + = _objects.yank(object, descendants_end); + + for (Objects::iterator i = removed->begin(); i != removed->end(); ++i) { cout << "\t" << i->first << endl; } cout << "}" << endl; @@ -143,7 +145,7 @@ ObjectStore::remove(Objects::iterator object) } else { cerr << "[ObjectStore] WARNING: Removing " << object->first << " failed." << endl; - return Objects(); + return SharedPtr<Objects>(); } } |