From a8b36b5637acb3fa8eb29ef0f45bd11653f412fa Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 16 Aug 2008 03:23:15 +0000 Subject: 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 --- src/libs/engine/events/ClearPatchEvent.cpp | 2 +- src/libs/engine/events/DestroyEvent.cpp | 6 +++--- src/libs/engine/events/DestroyEvent.hpp | 2 +- src/libs/engine/events/RenameEvent.cpp | 4 ++-- src/libs/engine/events/RenameEvent.hpp | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/libs/engine/events') 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(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, 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(_store_iterator->second); if (!_node) _port = PtrCast(_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 _node; ///< Non-NULL iff a node SharedPtr _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, 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; }; -- cgit v1.2.1