summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-08-16 03:23:15 +0000
committerDavid Robillard <d@drobilla.net>2008-08-16 03:23:15 +0000
commita8b36b5637acb3fa8eb29ef0f45bd11653f412fa (patch)
tree3a0f0dbef302269f8e509d9f5c2d4c713e00face /src/libs/engine/events
parent49e8582cb6720d43389e7d2534be11a4fb0b8959 (diff)
downloadingen-a8b36b5637acb3fa8eb29ef0f45bd11653f412fa.tar.gz
ingen-a8b36b5637acb3fa8eb29ef0f45bd11653f412fa.tar.bz2
ingen-a8b36b5637acb3fa8eb29ef0f45bd11653f412fa.zip
Factor out common store functionality.
Make store is-a Table and ditch store->objects() thing everywhere. Use a separate store in the client (fix ingen -eg). git-svn-id: http://svn.drobilla.net/lad/ingen@1397 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/events')
-rw-r--r--src/libs/engine/events/ClearPatchEvent.cpp2
-rw-r--r--src/libs/engine/events/DestroyEvent.cpp6
-rw-r--r--src/libs/engine/events/DestroyEvent.hpp2
-rw-r--r--src/libs/engine/events/RenameEvent.cpp4
-rw-r--r--src/libs/engine/events/RenameEvent.hpp2
5 files changed, 8 insertions, 8 deletions
diff --git a/src/libs/engine/events/ClearPatchEvent.cpp b/src/libs/engine/events/ClearPatchEvent.cpp
index 60b882f9..30b69915 100644
--- a/src/libs/engine/events/ClearPatchEvent.cpp
+++ b/src/libs/engine/events/ClearPatchEvent.cpp
@@ -49,7 +49,7 @@ ClearPatchEvent::pre_process()
{
EngineStore::Objects::iterator patch_iterator = _engine.object_store()->find(_patch_path);
- if (patch_iterator != _engine.object_store()->objects().end()) {
+ if (patch_iterator != _engine.object_store()->end()) {
_patch = PtrCast<PatchImpl>(patch_iterator->second);
if (_patch) {
_process = _patch->enabled();
diff --git a/src/libs/engine/events/DestroyEvent.cpp b/src/libs/engine/events/DestroyEvent.cpp
index bdcb1ad2..6d1fc3fb 100644
--- a/src/libs/engine/events/DestroyEvent.cpp
+++ b/src/libs/engine/events/DestroyEvent.cpp
@@ -37,7 +37,7 @@ namespace Ingen {
DestroyEvent::DestroyEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& path, bool block)
: QueuedEvent(engine, responder, time, source, source)
, _path(path)
- , _store_iterator(engine.object_store()->objects().end())
+ , _store_iterator(engine.object_store()->end())
, _driver_port(NULL)
, _patch_node_listnode(NULL)
, _patch_port_listnode(NULL)
@@ -60,14 +60,14 @@ DestroyEvent::pre_process()
{
_store_iterator = _engine.object_store()->find(_path);
- if (_store_iterator != _engine.object_store()->objects().end()) {
+ if (_store_iterator != _engine.object_store()->end()) {
_node = PtrCast<NodeImpl>(_store_iterator->second);
if (!_node)
_port = PtrCast<PortImpl>(_store_iterator->second);
}
- if (_store_iterator != _engine.object_store()->objects().end()) {
+ if (_store_iterator != _engine.object_store()->end()) {
_removed_table = _engine.object_store()->remove(_store_iterator);
}
diff --git a/src/libs/engine/events/DestroyEvent.hpp b/src/libs/engine/events/DestroyEvent.hpp
index c2cf9ed5..b24934f8 100644
--- a/src/libs/engine/events/DestroyEvent.hpp
+++ b/src/libs/engine/events/DestroyEvent.hpp
@@ -58,7 +58,7 @@ public:
private:
Path _path;
- EngineStore::Objects::iterator _store_iterator;
+ EngineStore::iterator _store_iterator;
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 cd2189e8..73426a59 100644
--- a/src/libs/engine/events/RenameEvent.cpp
+++ b/src/libs/engine/events/RenameEvent.cpp
@@ -37,7 +37,7 @@ RenameEvent::RenameEvent(Engine& engine, SharedPtr<Responder> responder, SampleC
_name(name),
_new_path("/"),
_parent_patch(NULL),
- _store_iterator(engine.object_store()->objects().end()),
+ _store_iterator(engine.object_store()->end()),
_error(NO_ERROR)
{
/*
@@ -65,7 +65,7 @@ RenameEvent::pre_process()
_new_path = _old_path.parent().base() + _name;
_store_iterator = _engine.object_store()->find(_old_path);
- if (_store_iterator == _engine.object_store()->objects().end()) {
+ if (_store_iterator == _engine.object_store()->end()) {
_error = OBJECT_NOT_FOUND;
QueuedEvent::pre_process();
return;
diff --git a/src/libs/engine/events/RenameEvent.hpp b/src/libs/engine/events/RenameEvent.hpp
index 114b59fa..e230c589 100644
--- a/src/libs/engine/events/RenameEvent.hpp
+++ b/src/libs/engine/events/RenameEvent.hpp
@@ -54,7 +54,7 @@ private:
string _name;
Path _new_path;
PatchImpl* _parent_patch;
- EngineStore::Objects::iterator _store_iterator;
+ EngineStore::iterator _store_iterator;
ErrorType _error;
};