diff options
author | David Robillard <d@drobilla.net> | 2012-08-14 21:37:20 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-08-14 21:37:20 +0000 |
commit | 76b602f1f834cb2c255848c5ba887b3d7c47171a (patch) | |
tree | cbe6588c70f2df4384231d9cbdfd06fb0aa7e45f /src/server/events/CreateNode.cpp | |
parent | a8312be2d849b73ff0acc80a226095bcfee3556c (diff) | |
download | ingen-76b602f1f834cb2c255848c5ba887b3d7c47171a.tar.gz ingen-76b602f1f834cb2c255848c5ba887b3d7c47171a.tar.bz2 ingen-76b602f1f834cb2c255848c5ba887b3d7c47171a.zip |
Replace use of old Raul Table stuff with std::map.
Move most Store functionality into Ingen::Store and eliminate EngineStore.
Much cleaner delete and move implementations.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4696 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/events/CreateNode.cpp')
-rw-r--r-- | src/server/events/CreateNode.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/server/events/CreateNode.cpp b/src/server/events/CreateNode.cpp index acdc9091..e88434b7 100644 --- a/src/server/events/CreateNode.cpp +++ b/src/server/events/CreateNode.cpp @@ -14,6 +14,7 @@ along with Ingen. If not, see <http://www.gnu.org/licenses/>. */ +#include "ingen/Store.hpp" #include "ingen/URIs.hpp" #include "raul/Maid.hpp" #include "raul/Path.hpp" @@ -21,7 +22,6 @@ #include "Broadcaster.hpp" #include "CreateNode.hpp" #include "Engine.hpp" -#include "EngineStore.hpp" #include "NodeFactory.hpp" #include "NodeImpl.hpp" #include "PatchImpl.hpp" @@ -65,11 +65,12 @@ CreateNode::pre_process() return Event::pre_process_done(BAD_REQUEST); } - if (_engine.engine_store()->find_object(_path)) { + if (_engine.store()->get(_path)) { return Event::pre_process_done(EXISTS, _path); } - if (!(_patch = _engine.engine_store()->find_patch(_path.parent()))) { + _patch = dynamic_cast<PatchImpl*>(_engine.store()->get(_path.parent())); + if (!_patch) { return Event::pre_process_done(PARENT_NOT_FOUND, _path.parent()); } @@ -98,7 +99,7 @@ CreateNode::pre_process() // Add node to the store and the patch's pre-processor only node list _patch->add_node(new PatchImpl::Nodes::Node(_node)); - _engine.engine_store()->add(_node); + _engine.store()->add(_node); /* Compile patch with new node added for insertion in audio thread TODO: Since the node is not connected at this point, a full compilation |