summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-10 05:45:04 +0000
committerDavid Robillard <d@drobilla.net>2007-10-10 05:45:04 +0000
commitc7f3a28390e651e03a68b664086351788a6a2d73 (patch)
treee4e7037981a876c8e6c69414f6662b0682995212 /src/libs/engine/events
parent670bf40134c1aa7c1ff175ff8acd9dbed7b9ab41 (diff)
downloadingen-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/events')
-rw-r--r--src/libs/engine/events/DestroyEvent.cpp1
-rw-r--r--src/libs/engine/events/DestroyEvent.hpp2
-rw-r--r--src/libs/engine/events/RenameEvent.cpp10
3 files changed, 7 insertions, 6 deletions
diff --git a/src/libs/engine/events/DestroyEvent.cpp b/src/libs/engine/events/DestroyEvent.cpp
index cf250f2f..59e6af5b 100644
--- a/src/libs/engine/events/DestroyEvent.cpp
+++ b/src/libs/engine/events/DestroyEvent.cpp
@@ -39,7 +39,6 @@ DestroyEvent::DestroyEvent(Engine& engine, SharedPtr<Responder> responder, Frame
: QueuedEvent(engine, responder, time, source, source),
_path(path),
_store_iterator(engine.object_store()->objects().end()),
- _removed_table(NULL),
_driver_port(NULL),
_patch_node_listnode(NULL),
_patch_port_listnode(NULL),
diff --git a/src/libs/engine/events/DestroyEvent.hpp b/src/libs/engine/events/DestroyEvent.hpp
index 10e59751..4a82c5bb 100644
--- a/src/libs/engine/events/DestroyEvent.hpp
+++ b/src/libs/engine/events/DestroyEvent.hpp
@@ -60,7 +60,7 @@ public:
private:
Path _path;
ObjectStore::Objects::iterator _store_iterator;
- Table<Path, SharedPtr<Shared::GraphObject> > _removed_table;
+ SharedPtr< Table<Path, SharedPtr<Shared::GraphObject> > > _removed_table;
SharedPtr<NodeImpl> _node; ///< Non-NULL iff a node
SharedPtr<PortImpl> _port; ///< Non-NULL iff a port
DriverPort* _driver_port;
diff --git a/src/libs/engine/events/RenameEvent.cpp b/src/libs/engine/events/RenameEvent.cpp
index d0ef532a..1b563d11 100644
--- a/src/libs/engine/events/RenameEvent.cpp
+++ b/src/libs/engine/events/RenameEvent.cpp
@@ -77,10 +77,12 @@ RenameEvent::pre_process()
return;
}
- Table<Path, SharedPtr<Shared::GraphObject> > removed = _engine.object_store()->remove(_store_iterator);
- assert(removed.size() > 0);
+ SharedPtr< Table<Path, SharedPtr<Shared::GraphObject> > > removed
+ = _engine.object_store()->remove(_store_iterator);
+
+ assert(removed->size() > 0);
- for (Table<Path, SharedPtr<Shared::GraphObject> >::iterator i = removed.begin(); i != removed.end(); ++i) {
+ for (Table<Path, SharedPtr<Shared::GraphObject> >::iterator i = removed->begin(); i != removed->end(); ++i) {
const Path& child_old_path = i->first;
assert(Path::descendant_comparator(_old_path, child_old_path));
@@ -94,7 +96,7 @@ RenameEvent::pre_process()
i->first = child_new_path;
}
- _engine.object_store()->add(removed);
+ _engine.object_store()->add(*removed.get());
QueuedEvent::pre_process();
}