diff options
Diffstat (limited to 'src')
55 files changed, 245 insertions, 89 deletions
diff --git a/src/libs/client/Store.hpp b/src/libs/client/ClientStore.cpp index f86c511a..24c23f14 100644 --- a/src/libs/client/Store.hpp +++ b/src/libs/client/ClientStore.cpp @@ -28,7 +28,7 @@ #include <raul/PathTable.hpp> #include <raul/TableImpl.hpp> #include "interface/EngineInterface.hpp" -#include "interface/Store.hpp" +#include "shared/Store.hpp" using std::string; using std::list; using Ingen::Shared::EngineInterface; using Raul::Path; diff --git a/src/libs/client/ClientStore.hpp b/src/libs/client/ClientStore.hpp new file mode 100644 index 00000000..24c23f14 --- /dev/null +++ b/src/libs/client/ClientStore.hpp @@ -0,0 +1,155 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard <http://drobilla.net> + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef STORE_H +#define STORE_H + +#include <cassert> +#include <string> +#include <list> +#include <raul/SharedPtr.hpp> +#include <sigc++/sigc++.h> +#include <raul/Path.hpp> +#include <raul/Atom.hpp> +#include <raul/PathTable.hpp> +#include <raul/TableImpl.hpp> +#include "interface/EngineInterface.hpp" +#include "shared/Store.hpp" +using std::string; using std::list; +using Ingen::Shared::EngineInterface; +using Raul::Path; +using Raul::Atom; + +namespace Ingen { + +namespace Shared { class GraphObject; } + +namespace Client { + +class SigClientInterface; +class ObjectModel; +class PluginModel; +class PatchModel; +class NodeModel; +class PortModel; +class ConnectionModel; + + +/** Automatically manages models of objects in the engine. + * + * \ingroup IngenClient + */ +class ClientStore : public Shared::Store, public sigc::trackable { // FIXME: is trackable necessary? +public: + ClientStore(SharedPtr<EngineInterface> engine, SharedPtr<SigClientInterface> emitter); + + SharedPtr<PluginModel> plugin(const string& uri); + SharedPtr<ObjectModel> object(const Path& path); + + void clear(); + + size_t num_object() { return _objects.size(); } + + Objects::iterator find(const Path& path) { return _objects.find(path); } + + typedef Raul::Table<string, SharedPtr<PluginModel> > Plugins; + const Plugins& plugins() const { return _plugins; } + + typedef Raul::PathTable< SharedPtr<Shared::GraphObject> > Objects; + const Objects& objects() const { return _objects; } + Objects& objects() { return _objects; } + + Objects::const_iterator children_begin(SharedPtr<Shared::GraphObject> o) const; + Objects::const_iterator children_end(SharedPtr<Shared::GraphObject> o) const; + + SharedPtr<Shared::GraphObject> find_child(SharedPtr<Shared::GraphObject> parent, + const string& child_name) const; + + sigc::signal<void, SharedPtr<ObjectModel> > signal_new_object; + sigc::signal<void, SharedPtr<PluginModel> > signal_new_plugin; + +private: + + void add(Shared::GraphObject* o) { throw; } + + void add_object(SharedPtr<ObjectModel> object); + SharedPtr<ObjectModel> remove_object(const Path& path); + + void add_plugin(SharedPtr<PluginModel> plugin); + + SharedPtr<PatchModel> connection_patch(const Path& src_port_path, const Path& dst_port_path); + + // It would be nice to integrate these somehow.. + + void add_orphan(SharedPtr<ObjectModel> orphan); + void resolve_orphans(SharedPtr<ObjectModel> parent); + + void add_connection_orphan(std::pair<Path, Path> orphan); + void resolve_connection_orphans(SharedPtr<PortModel> port); + + void add_plugin_orphan(SharedPtr<NodeModel> orphan); + void resolve_plugin_orphans(SharedPtr<PluginModel> plugin); + + void add_variable_orphan(const Path& subject, const string& predicate, const Atom& value); + void resolve_variable_orphans(SharedPtr<ObjectModel> subject); + + // Slots for SigClientInterface signals + void destruction_event(const Path& path); + void rename_event(const Path& old_path, const Path& new_path); + void new_plugin_event(const string& uri, const string& type_uri, const string& symbol, const string& name); + void new_patch_event(const Path& path, uint32_t poly); + void new_node_event(const string& plugin_uri, const Path& node_path, bool is_polyphonic, uint32_t num_ports); + void new_port_event(const Path& path, uint32_t index, const string& data_type, bool is_output); + void polyphonic_event(const Path& path, bool polyphonic); + void patch_enabled_event(const Path& path); + void patch_disabled_event(const Path& path); + void patch_polyphony_event(const Path& path, uint32_t poly); + void patch_cleared_event(const Path& path); + void variable_change_event(const Path& subject_path, const string& predicate, const Atom& value); + void control_change_event(const Path& port_path, float value); + void port_activity_event(const Path& port_path); + void connection_event(const Path& src_port_path, const Path& dst_port_path); + void disconnection_event(const Path& src_port_path, const Path& dst_port_path); + + bool attempt_connection(const Path& src_port_path, const Path& dst_port_path, bool add_orphan=false); + + SharedPtr<EngineInterface> _engine; + SharedPtr<SigClientInterface> _emitter; + + Objects _objects; ///< Map, keyed by Ingen path + Plugins _plugins; ///< Map, keyed by plugin URI + + /** Objects we've received, but depend on the existance of another unknown object. + * Keyed by the path of the depended-on object (for tolerance of orderless comms) */ + Raul::PathTable<list<SharedPtr<ObjectModel> > > _orphans; + + /** Same idea, except with plugins instead of parents. + * It's unfortunate everything doesn't just have a URI and this was the same.. ahem.. */ + Raul::Table<string, list<SharedPtr<NodeModel> > > _plugin_orphans; + + /** Not orphans OF variable like the above, but orphans which are variable */ + Raul::PathTable<list<std::pair<string, Atom> > > _variable_orphans; + + /** Ditto */ + list<std::pair<Path, Path> > _connection_orphans; +}; + + +} // namespace Client +} // namespace Ingen + +#endif // STORE_H diff --git a/src/libs/client/Makefile.am b/src/libs/client/Makefile.am index f111a54d..7047ce62 100644 --- a/src/libs/client/Makefile.am +++ b/src/libs/client/Makefile.am @@ -49,8 +49,8 @@ libingen_client_la_SOURCES = \ PortModel.cpp \ PortModel.hpp \ SigClientInterface.hpp \ - Store.cpp \ - Store.hpp \ + ClientStore.cpp \ + ClientStore.hpp \ ThreadedSigClientInterface.cpp \ ThreadedSigClientInterface.hpp \ client.cpp \ diff --git a/src/libs/client/ObjectModel.hpp b/src/libs/client/ObjectModel.hpp index f052f1d9..dbd188a3 100644 --- a/src/libs/client/ObjectModel.hpp +++ b/src/libs/client/ObjectModel.hpp @@ -30,7 +30,6 @@ #include <raul/SharedPtr.hpp> #include <raul/PathTable.hpp> #include "interface/GraphObject.hpp" -#include "Store.hpp" using Raul::PathTable; using std::string; diff --git a/src/libs/client/PatchModel.cpp b/src/libs/client/PatchModel.cpp index 7f928b41..360707d3 100644 --- a/src/libs/client/PatchModel.cpp +++ b/src/libs/client/PatchModel.cpp @@ -18,6 +18,7 @@ #include "PatchModel.hpp" #include "NodeModel.hpp" #include "ConnectionModel.hpp" +#include "ClientStore.hpp" #include <cassert> #include <iostream> diff --git a/src/libs/engine/ClientBroadcaster.cpp b/src/libs/engine/ClientBroadcaster.cpp index bc77cc27..34f34933 100644 --- a/src/libs/engine/ClientBroadcaster.cpp +++ b/src/libs/engine/ClientBroadcaster.cpp @@ -20,7 +20,7 @@ #include <unistd.h> #include "interface/ClientInterface.hpp" #include "ClientBroadcaster.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "NodeFactory.hpp" #include "util.hpp" #include "PatchImpl.hpp" diff --git a/src/libs/engine/Engine.cpp b/src/libs/engine/Engine.cpp index e7c2545c..382f44b9 100644 --- a/src/libs/engine/Engine.cpp +++ b/src/libs/engine/Engine.cpp @@ -27,12 +27,12 @@ #include "tuning.hpp" #include "Event.hpp" #include "common/interface/EventType.hpp" -#include "common/interface/Store.hpp" +#include "shared/Store.hpp" #include "JackAudioDriver.hpp" #include "NodeFactory.hpp" #include "ClientBroadcaster.hpp" #include "PatchImpl.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "MidiDriver.hpp" #include "OSCDriver.hpp" #include "QueuedEventSource.hpp" @@ -64,9 +64,9 @@ Engine::Engine(Ingen::Shared::World* world) , _activated(false) { if (world->store) { - assert(PtrCast<ObjectStore>(world->store)); + assert(PtrCast<EngineStore>(world->store)); } else { - world->store = SharedPtr<Store>(new ObjectStore()); + world->store = SharedPtr<Store>(new EngineStore()); } } @@ -75,7 +75,7 @@ Engine::~Engine() { deactivate(); - for (ObjectStore::Objects::iterator i = object_store()->objects().begin(); + for (EngineStore::Objects::iterator i = object_store()->objects().begin(); i != object_store()->objects().end(); ++i) { if ( ! PtrCast<GraphObjectImpl>(i->second)->parent() ) i->second.reset(); @@ -93,10 +93,10 @@ Engine::~Engine() } -ObjectStore* +EngineStore* Engine::object_store() const { - return dynamic_cast<ObjectStore*>(_world->store.get()); + return dynamic_cast<EngineStore*>(_world->store.get()); } diff --git a/src/libs/engine/Engine.hpp b/src/libs/engine/Engine.hpp index 1d3b4253..dd8f3b15 100644 --- a/src/libs/engine/Engine.hpp +++ b/src/libs/engine/Engine.hpp @@ -38,7 +38,7 @@ class MidiDriver; class OSCDriver; class NodeFactory; class ClientBroadcaster; -class ObjectStore; +class EngineStore; class EventSource; class PostProcessor; class Event; @@ -92,7 +92,7 @@ public: ClientBroadcaster* broadcaster() const { return _broadcaster; } NodeFactory* node_factory() const { return _node_factory; } - ObjectStore* object_store() const; + EngineStore* object_store() const; /** Return the active driver for the given type */ Driver* driver(DataType type, EventType event_type); diff --git a/src/libs/engine/ObjectStore.cpp b/src/libs/engine/EngineStore.cpp index 3cecb338..90268e9b 100644 --- a/src/libs/engine/ObjectStore.cpp +++ b/src/libs/engine/EngineStore.cpp @@ -20,7 +20,7 @@ #include <raul/List.hpp> #include <raul/PathTable.hpp> #include <raul/TableImpl.hpp> -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "PatchImpl.hpp" #include "NodeImpl.hpp" #include "PortImpl.hpp" @@ -35,7 +35,7 @@ namespace Ingen { /** Find the Patch at the given path. */ PatchImpl* -ObjectStore::find_patch(const Path& path) +EngineStore::find_patch(const Path& path) { GraphObjectImpl* const object = find_object(path); return dynamic_cast<PatchImpl*>(object); @@ -45,7 +45,7 @@ ObjectStore::find_patch(const Path& path) /** Find the Node at the given path. */ NodeImpl* -ObjectStore::find_node(const Path& path) +EngineStore::find_node(const Path& path) { GraphObjectImpl* const object = find_object(path); return dynamic_cast<NodeImpl*>(object); @@ -55,7 +55,7 @@ ObjectStore::find_node(const Path& path) /** Find the Port at the given path. */ PortImpl* -ObjectStore::find_port(const Path& path) +EngineStore::find_port(const Path& path) { GraphObjectImpl* const object = find_object(path); return dynamic_cast<PortImpl*>(object); @@ -65,15 +65,15 @@ ObjectStore::find_port(const Path& path) /** Find the Object at the given path. */ GraphObjectImpl* -ObjectStore::find_object(const Path& path) +EngineStore::find_object(const Path& path) { Objects::iterator i = _objects.find(path); return ((i == _objects.end()) ? NULL : dynamic_cast<GraphObjectImpl*>(i->second.get())); } -ObjectStore::Objects::const_iterator -ObjectStore::children_begin(SharedPtr<Shared::GraphObject> o) const +EngineStore::Objects::const_iterator +EngineStore::children_begin(SharedPtr<Shared::GraphObject> o) const { Objects::const_iterator parent = _objects.find(o->path()); assert(parent != _objects.end()); @@ -82,8 +82,8 @@ ObjectStore::children_begin(SharedPtr<Shared::GraphObject> o) const } -ObjectStore::Objects::const_iterator -ObjectStore::children_end(SharedPtr<Shared::GraphObject> o) const +EngineStore::Objects::const_iterator +EngineStore::children_end(SharedPtr<Shared::GraphObject> o) const { Objects::const_iterator parent = _objects.find(o->path()); assert(parent != _objects.end()); @@ -94,7 +94,7 @@ ObjectStore::children_end(SharedPtr<Shared::GraphObject> o) const /** Add an object to the store. Not realtime safe. */ void -ObjectStore::add(GraphObject* obj) +EngineStore::add(GraphObject* obj) { GraphObjectImpl* o = dynamic_cast<GraphObjectImpl*>(obj); assert(o); @@ -102,7 +102,7 @@ ObjectStore::add(GraphObject* obj) assert(ThreadManager::current_thread_id() == THREAD_PRE_PROCESS); if (_objects.find(o->path()) != _objects.end()) { - cerr << "[ObjectStore] ERROR: Attempt to add duplicate object " << o->path() << endl; + cerr << "[EngineStore] ERROR: Attempt to add duplicate object " << o->path() << endl; return; } @@ -120,14 +120,14 @@ ObjectStore::add(GraphObject* obj) /** Add a family of objects to the store. Not realtime safe. */ void -ObjectStore::add(const Table<Path, SharedPtr<Shared::GraphObject> >& table) +EngineStore::add(const Table<Path, SharedPtr<Shared::GraphObject> >& table) { assert(ThreadManager::current_thread_id() == THREAD_PRE_PROCESS); - //cerr << "[ObjectStore] Adding " << o[0].second->path() << endl; + //cerr << "[EngineStore] Adding " << o[0].second->path() << endl; _objects.cram(table); - /*cerr << "[ObjectStore] Adding Table:" << endl; + /*cerr << "[EngineStore] Adding Table:" << endl; for (Objects::const_iterator i = table.begin(); i != table.end(); ++i) { cerr << i->first << " = " << i->second->path() << endl; }*/ @@ -140,7 +140,7 @@ ObjectStore::add(const Table<Path, SharedPtr<Shared::GraphObject> >& table) * including the object itself, in lexicographically sorted order by Path. */ SharedPtr< Table<Path, SharedPtr<Shared::GraphObject> > > -ObjectStore::remove(const Path& path) +EngineStore::remove(const Path& path) { return remove(_objects.find(path)); } @@ -152,13 +152,13 @@ ObjectStore::remove(const Path& path) * including the object itself, in lexicographically sorted order by Path. */ SharedPtr< Table<Path, SharedPtr<Shared::GraphObject> > > -ObjectStore::remove(Objects::iterator object) +EngineStore::remove(Objects::iterator object) { assert(ThreadManager::current_thread_id() == THREAD_PRE_PROCESS); if (object != _objects.end()) { Objects::iterator descendants_end = _objects.find_descendants_end(object); - //cout << "[ObjectStore] Removing " << object->first << " {" << endl; + //cout << "[EngineStore] Removing " << object->first << " {" << endl; SharedPtr< Table<Path, SharedPtr<Shared::GraphObject> > > removed = _objects.yank(object, descendants_end); /*for (Objects::iterator i = removed->begin(); i != removed->end(); ++i) { @@ -169,7 +169,7 @@ ObjectStore::remove(Objects::iterator object) return removed; } else { - cerr << "[ObjectStore] WARNING: Removing " << object->first << " failed." << endl; + cerr << "[EngineStore] WARNING: Removing " << object->first << " failed." << endl; return SharedPtr<Objects>(); } } @@ -181,7 +181,7 @@ ObjectStore::remove(Objects::iterator object) * in lexicographically sorted order by Path. */ SharedPtr< Table<Path, SharedPtr<Shared::GraphObject> > > -ObjectStore::remove_children(const Path& path) +EngineStore::remove_children(const Path& path) { return remove_children(_objects.find(path)); } @@ -193,7 +193,7 @@ ObjectStore::remove_children(const Path& path) * in lexicographically sorted order by Path. */ SharedPtr< Table<Path, SharedPtr<Shared::GraphObject> > > -ObjectStore::remove_children(Objects::iterator object) +EngineStore::remove_children(Objects::iterator object) { if (object != _objects.end()) { Objects::iterator descendants_end = _objects.find_descendants_end(object); @@ -205,7 +205,7 @@ ObjectStore::remove_children(Objects::iterator object) } } else { - cerr << "[ObjectStore] WARNING: Removing children of " << object->first << " failed." << endl; + cerr << "[EngineStore] WARNING: Removing children of " << object->first << " failed." << endl; return SharedPtr<Objects>(); } diff --git a/src/libs/engine/ObjectStore.hpp b/src/libs/engine/EngineStore.hpp index edba52f0..e128dde8 100644 --- a/src/libs/engine/ObjectStore.hpp +++ b/src/libs/engine/EngineStore.hpp @@ -21,7 +21,7 @@ #include <string> #include <raul/PathTable.hpp> #include <raul/SharedPtr.hpp> -#include "interface/Store.hpp" +#include "shared/Store.hpp" using std::string; using namespace Raul; @@ -45,7 +45,7 @@ class GraphObjectImpl; * Searching with find*() is fast (O(log(n)) binary search on contiguous * memory) and realtime safe, but modification (add or remove) are neither. */ -class ObjectStore : public Shared::Store +class EngineStore : public Shared::Store { public: typedef Raul::PathTable< SharedPtr<Shared::GraphObject> > Objects; diff --git a/src/libs/engine/GraphObjectImpl.cpp b/src/libs/engine/GraphObjectImpl.cpp index 5275261f..0e1abc57 100644 --- a/src/libs/engine/GraphObjectImpl.cpp +++ b/src/libs/engine/GraphObjectImpl.cpp @@ -17,7 +17,7 @@ #include "GraphObjectImpl.hpp" #include "PatchImpl.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" namespace Ingen { diff --git a/src/libs/engine/HTTPEngineReceiver.cpp b/src/libs/engine/HTTPEngineReceiver.cpp index 47da1eb1..ee16cf44 100644 --- a/src/libs/engine/HTTPEngineReceiver.cpp +++ b/src/libs/engine/HTTPEngineReceiver.cpp @@ -29,7 +29,7 @@ #include "HTTPEngineReceiver.hpp" #include "QueuedEventSource.hpp" #include "ClientBroadcaster.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" using namespace std; @@ -122,10 +122,10 @@ HTTPEngineReceiver::message_callback(SoupServer* server, SoupMessage* msg, const } #if 0 - ObjectStore::Objects::iterator end = store->objects().find_descendants_end(start); + EngineStore::Objects::iterator end = store->objects().find_descendants_end(start); string response; - for (ObjectStore::Objects::iterator i = start; i != end; ++i) + for (EngineStore::Objects::iterator i = start; i != end; ++i) response.append(i->first).append("\n"); #endif diff --git a/src/libs/engine/Makefile.am b/src/libs/engine/Makefile.am index 938d6817..5d7cb10f 100644 --- a/src/libs/engine/Makefile.am +++ b/src/libs/engine/Makefile.am @@ -91,8 +91,8 @@ libingen_engine_la_SOURCES = \ OSCEngineReceiver.hpp \ ObjectSender.cpp \ ObjectSender.hpp \ - ObjectStore.cpp \ - ObjectStore.hpp \ + EngineStore.cpp \ + EngineStore.hpp \ OutputPort.cpp \ OutputPort.hpp \ PatchImpl.cpp \ diff --git a/src/libs/engine/NodeBase.cpp b/src/libs/engine/NodeBase.cpp index 6eb0f8d8..bb4f0e5c 100644 --- a/src/libs/engine/NodeBase.cpp +++ b/src/libs/engine/NodeBase.cpp @@ -26,7 +26,7 @@ #include "ClientBroadcaster.hpp" #include "PortImpl.hpp" #include "PatchImpl.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "ThreadManager.hpp" using namespace std; diff --git a/src/libs/engine/NodeBase.hpp b/src/libs/engine/NodeBase.hpp index 2671a5a0..e4e2bfe5 100644 --- a/src/libs/engine/NodeBase.hpp +++ b/src/libs/engine/NodeBase.hpp @@ -32,7 +32,7 @@ namespace Ingen { class PluginImpl; class PatchImpl; -class ObjectStore; +class EngineStore; namespace Shared { class ClientInterface; diff --git a/src/libs/engine/OSCClientSender.cpp b/src/libs/engine/OSCClientSender.cpp index 98164de7..3b853571 100644 --- a/src/libs/engine/OSCClientSender.cpp +++ b/src/libs/engine/OSCClientSender.cpp @@ -20,7 +20,7 @@ #include <iostream> #include <unistd.h> #include <raul/AtomLiblo.hpp> -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "NodeFactory.hpp" #include "util.hpp" #include "PatchImpl.hpp" diff --git a/src/libs/engine/ObjectSender.cpp b/src/libs/engine/ObjectSender.cpp index fff2a797..67bd41d2 100644 --- a/src/libs/engine/ObjectSender.cpp +++ b/src/libs/engine/ObjectSender.cpp @@ -17,7 +17,7 @@ #include "ObjectSender.hpp" #include "interface/ClientInterface.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "PatchImpl.hpp" #include "NodeImpl.hpp" #include "PortImpl.hpp" diff --git a/src/libs/engine/events/AllNotesOffEvent.cpp b/src/libs/engine/events/AllNotesOffEvent.cpp index a0b3360f..6012ea92 100644 --- a/src/libs/engine/events/AllNotesOffEvent.cpp +++ b/src/libs/engine/events/AllNotesOffEvent.cpp @@ -18,9 +18,9 @@ #include "AllNotesOffEvent.hpp" #include "Responder.hpp" #include "Engine.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "module/World.hpp" -#include "interface/Store.hpp" +#include "shared/Store.hpp" namespace Ingen { diff --git a/src/libs/engine/events/ClearPatchEvent.cpp b/src/libs/engine/events/ClearPatchEvent.cpp index 0e725e65..60b882f9 100644 --- a/src/libs/engine/events/ClearPatchEvent.cpp +++ b/src/libs/engine/events/ClearPatchEvent.cpp @@ -22,7 +22,7 @@ #include "PatchImpl.hpp" #include "ClientBroadcaster.hpp" #include "util.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "PortImpl.hpp" #include "NodeImpl.hpp" #include "ConnectionImpl.hpp" @@ -47,7 +47,7 @@ ClearPatchEvent::ClearPatchEvent(Engine& engine, SharedPtr<Responder> responder, void ClearPatchEvent::pre_process() { - ObjectStore::Objects::iterator patch_iterator = _engine.object_store()->find(_patch_path); + EngineStore::Objects::iterator patch_iterator = _engine.object_store()->find(_patch_path); if (patch_iterator != _engine.object_store()->objects().end()) { _patch = PtrCast<PatchImpl>(patch_iterator->second); @@ -88,7 +88,7 @@ ClearPatchEvent::execute(ProcessContext& context) // Remove driver ports, if necessary if (_patch->parent() == NULL) { - for (ObjectStore::Objects::iterator i = _removed_table->begin(); i != _removed_table->end(); ++i) { + for (EngineStore::Objects::iterator i = _removed_table->begin(); i != _removed_table->end(); ++i) { SharedPtr<PortImpl> port = PtrCast<PortImpl>(i->second); if (port && port->type() == DataType::AUDIO) _driver_port = _engine.audio_driver()->remove_port(port->path()); diff --git a/src/libs/engine/events/ClearPatchEvent.hpp b/src/libs/engine/events/ClearPatchEvent.hpp index 0353dc01..803721fb 100644 --- a/src/libs/engine/events/ClearPatchEvent.hpp +++ b/src/libs/engine/events/ClearPatchEvent.hpp @@ -23,7 +23,7 @@ #include <raul/Table.hpp> #include <raul/Path.hpp> #include "QueuedEvent.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "PatchImpl.hpp" using std::string; diff --git a/src/libs/engine/events/ConnectionEvent.cpp b/src/libs/engine/events/ConnectionEvent.cpp index ac04d1cc..55286ffd 100644 --- a/src/libs/engine/events/ConnectionEvent.cpp +++ b/src/libs/engine/events/ConnectionEvent.cpp @@ -25,7 +25,7 @@ #include "ConnectionImpl.hpp" #include "Engine.hpp" #include "InputPort.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "OutputPort.hpp" #include "PatchImpl.hpp" #include "PortImpl.hpp" diff --git a/src/libs/engine/events/CreateNodeEvent.cpp b/src/libs/engine/events/CreateNodeEvent.cpp index 7589b150..d1d21a36 100644 --- a/src/libs/engine/events/CreateNodeEvent.cpp +++ b/src/libs/engine/events/CreateNodeEvent.cpp @@ -29,7 +29,7 @@ #include "PatchImpl.hpp" #include "NodeFactory.hpp" #include "ClientBroadcaster.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "PortImpl.hpp" #include "AudioDriver.hpp" diff --git a/src/libs/engine/events/CreatePatchEvent.cpp b/src/libs/engine/events/CreatePatchEvent.cpp index 8642dc1d..2b396cbb 100644 --- a/src/libs/engine/events/CreatePatchEvent.cpp +++ b/src/libs/engine/events/CreatePatchEvent.cpp @@ -25,7 +25,7 @@ #include "Engine.hpp" #include "ClientBroadcaster.hpp" #include "AudioDriver.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" namespace Ingen { @@ -79,7 +79,7 @@ CreatePatchEvent::pre_process() _patch->activate(); - // Insert into ObjectStore + // Insert into EngineStore //_patch->add_to_store(_engine.object_store()); _engine.object_store()->add(_patch); diff --git a/src/libs/engine/events/CreatePortEvent.cpp b/src/libs/engine/events/CreatePortEvent.cpp index aca33c67..b8ef244f 100644 --- a/src/libs/engine/events/CreatePortEvent.cpp +++ b/src/libs/engine/events/CreatePortEvent.cpp @@ -26,7 +26,7 @@ #include "Engine.hpp" #include "PatchImpl.hpp" #include "QueuedEventSource.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "ClientBroadcaster.hpp" #include "PortImpl.hpp" #include "AudioDriver.hpp" diff --git a/src/libs/engine/events/DestroyEvent.cpp b/src/libs/engine/events/DestroyEvent.cpp index bc28501e..bdcb1ad2 100644 --- a/src/libs/engine/events/DestroyEvent.cpp +++ b/src/libs/engine/events/DestroyEvent.cpp @@ -27,7 +27,7 @@ #include "MidiDriver.hpp" #include "DisconnectAllEvent.hpp" #include "ClientBroadcaster.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "QueuedEventSource.hpp" #include "PortImpl.hpp" diff --git a/src/libs/engine/events/DestroyEvent.hpp b/src/libs/engine/events/DestroyEvent.hpp index 5d87f27c..c2cf9ed5 100644 --- a/src/libs/engine/events/DestroyEvent.hpp +++ b/src/libs/engine/events/DestroyEvent.hpp @@ -21,7 +21,7 @@ #include <string> #include <raul/Path.hpp> #include "QueuedEvent.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "PatchImpl.hpp" using std::string; @@ -58,7 +58,7 @@ public: private: Path _path; - ObjectStore::Objects::iterator _store_iterator; + EngineStore::Objects::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/DisablePortMonitoringEvent.cpp b/src/libs/engine/events/DisablePortMonitoringEvent.cpp index d5b99618..02d64c0b 100644 --- a/src/libs/engine/events/DisablePortMonitoringEvent.cpp +++ b/src/libs/engine/events/DisablePortMonitoringEvent.cpp @@ -21,7 +21,7 @@ #include "Responder.hpp" #include "Engine.hpp" #include "PortImpl.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "ClientBroadcaster.hpp" #include "AudioBuffer.hpp" diff --git a/src/libs/engine/events/DisconnectAllEvent.cpp b/src/libs/engine/events/DisconnectAllEvent.cpp index a536fffc..78c2b23b 100644 --- a/src/libs/engine/events/DisconnectAllEvent.cpp +++ b/src/libs/engine/events/DisconnectAllEvent.cpp @@ -27,7 +27,7 @@ #include "Engine.hpp" #include "InputPort.hpp" #include "NodeImpl.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "OutputPort.hpp" #include "PatchImpl.hpp" #include "PortImpl.hpp" diff --git a/src/libs/engine/events/DisconnectionEvent.cpp b/src/libs/engine/events/DisconnectionEvent.cpp index 03110f9e..d796877f 100644 --- a/src/libs/engine/events/DisconnectionEvent.cpp +++ b/src/libs/engine/events/DisconnectionEvent.cpp @@ -27,7 +27,7 @@ #include "PatchImpl.hpp" #include "ClientBroadcaster.hpp" #include "PortImpl.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" using std::string; namespace Ingen { diff --git a/src/libs/engine/events/EnablePatchEvent.cpp b/src/libs/engine/events/EnablePatchEvent.cpp index b1cda98a..aff5885b 100644 --- a/src/libs/engine/events/EnablePatchEvent.cpp +++ b/src/libs/engine/events/EnablePatchEvent.cpp @@ -21,7 +21,7 @@ #include "PatchImpl.hpp" #include "util.hpp" #include "ClientBroadcaster.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" namespace Ingen { diff --git a/src/libs/engine/events/EnablePortBroadcastingEvent.cpp b/src/libs/engine/events/EnablePortBroadcastingEvent.cpp index dcc09ac4..cb7dc5ec 100644 --- a/src/libs/engine/events/EnablePortBroadcastingEvent.cpp +++ b/src/libs/engine/events/EnablePortBroadcastingEvent.cpp @@ -21,7 +21,7 @@ #include "Responder.hpp" #include "Engine.hpp" #include "PortImpl.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "ClientBroadcaster.hpp" #include "AudioBuffer.hpp" diff --git a/src/libs/engine/events/MidiLearnEvent.cpp b/src/libs/engine/events/MidiLearnEvent.cpp index 8d5b0658..3e8947b7 100644 --- a/src/libs/engine/events/MidiLearnEvent.cpp +++ b/src/libs/engine/events/MidiLearnEvent.cpp @@ -18,7 +18,7 @@ #include "MidiLearnEvent.hpp" #include "Responder.hpp" #include "Engine.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "NodeImpl.hpp" #include "MidiControlNode.hpp" #include "ClientBroadcaster.hpp" diff --git a/src/libs/engine/events/NoteEvent.cpp b/src/libs/engine/events/NoteEvent.cpp index 8f262d14..d5f2cf76 100644 --- a/src/libs/engine/events/NoteEvent.cpp +++ b/src/libs/engine/events/NoteEvent.cpp @@ -18,7 +18,7 @@ #include "NoteEvent.hpp" #include "Responder.hpp" #include "Engine.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "NodeImpl.hpp" #include "MidiNoteNode.hpp" #include "MidiTriggerNode.hpp" diff --git a/src/libs/engine/events/RenameEvent.cpp b/src/libs/engine/events/RenameEvent.cpp index 7d487cc1..cd2189e8 100644 --- a/src/libs/engine/events/RenameEvent.cpp +++ b/src/libs/engine/events/RenameEvent.cpp @@ -19,7 +19,7 @@ #include "ClientBroadcaster.hpp" #include "Engine.hpp" #include "NodeImpl.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "PatchImpl.hpp" #include "RenameEvent.hpp" #include "Responder.hpp" diff --git a/src/libs/engine/events/RenameEvent.hpp b/src/libs/engine/events/RenameEvent.hpp index dbfc6d53..114b59fa 100644 --- a/src/libs/engine/events/RenameEvent.hpp +++ b/src/libs/engine/events/RenameEvent.hpp @@ -21,7 +21,7 @@ #include <string> #include <raul/Path.hpp> #include "QueuedEvent.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" using std::string; @@ -54,7 +54,7 @@ private: string _name; Path _new_path; PatchImpl* _parent_patch; - ObjectStore::Objects::iterator _store_iterator; + EngineStore::Objects::iterator _store_iterator; ErrorType _error; }; diff --git a/src/libs/engine/events/RequestAllObjectsEvent.cpp b/src/libs/engine/events/RequestAllObjectsEvent.cpp index 7865cd9b..94e34f3b 100644 --- a/src/libs/engine/events/RequestAllObjectsEvent.cpp +++ b/src/libs/engine/events/RequestAllObjectsEvent.cpp @@ -20,7 +20,7 @@ #include "Engine.hpp" #include "ObjectSender.hpp" #include "ClientBroadcaster.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" namespace Ingen { diff --git a/src/libs/engine/events/RequestMetadataEvent.cpp b/src/libs/engine/events/RequestMetadataEvent.cpp index 99f0e04e..cf428c05 100644 --- a/src/libs/engine/events/RequestMetadataEvent.cpp +++ b/src/libs/engine/events/RequestMetadataEvent.cpp @@ -20,7 +20,7 @@ #include "Responder.hpp" #include "Engine.hpp" #include "GraphObjectImpl.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "interface/ClientInterface.hpp" #include "ClientBroadcaster.hpp" using std::string; diff --git a/src/libs/engine/events/RequestObjectEvent.cpp b/src/libs/engine/events/RequestObjectEvent.cpp index 34c04889..c1c93129 100644 --- a/src/libs/engine/events/RequestObjectEvent.cpp +++ b/src/libs/engine/events/RequestObjectEvent.cpp @@ -20,7 +20,7 @@ #include "interface/ClientInterface.hpp" #include "Responder.hpp" #include "Engine.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "ClientBroadcaster.hpp" #include "PatchImpl.hpp" #include "NodeImpl.hpp" diff --git a/src/libs/engine/events/RequestPluginEvent.cpp b/src/libs/engine/events/RequestPluginEvent.cpp index 1c1df99e..36358df7 100644 --- a/src/libs/engine/events/RequestPluginEvent.cpp +++ b/src/libs/engine/events/RequestPluginEvent.cpp @@ -21,7 +21,7 @@ #include "Responder.hpp" #include "Engine.hpp" #include "PortImpl.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "ClientBroadcaster.hpp" #include "NodeFactory.hpp" #include "PluginImpl.hpp" diff --git a/src/libs/engine/events/RequestPortValueEvent.cpp b/src/libs/engine/events/RequestPortValueEvent.cpp index e26b1036..1e09662b 100644 --- a/src/libs/engine/events/RequestPortValueEvent.cpp +++ b/src/libs/engine/events/RequestPortValueEvent.cpp @@ -21,7 +21,7 @@ #include "Responder.hpp" #include "Engine.hpp" #include "PortImpl.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "ClientBroadcaster.hpp" #include "AudioBuffer.hpp" #include "ProcessContext.hpp" diff --git a/src/libs/engine/events/SetMetadataEvent.cpp b/src/libs/engine/events/SetMetadataEvent.cpp index 2829eb1e..14293037 100644 --- a/src/libs/engine/events/SetMetadataEvent.cpp +++ b/src/libs/engine/events/SetMetadataEvent.cpp @@ -21,7 +21,7 @@ #include "Engine.hpp" #include "ClientBroadcaster.hpp" #include "GraphObjectImpl.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" using std::string; diff --git a/src/libs/engine/events/SetPolyphonicEvent.cpp b/src/libs/engine/events/SetPolyphonicEvent.cpp index 73e27c93..d2ff97aa 100644 --- a/src/libs/engine/events/SetPolyphonicEvent.cpp +++ b/src/libs/engine/events/SetPolyphonicEvent.cpp @@ -22,7 +22,7 @@ #include "PatchImpl.hpp" #include "ClientBroadcaster.hpp" #include "util.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "PortImpl.hpp" #include "NodeImpl.hpp" #include "ConnectionImpl.hpp" diff --git a/src/libs/engine/events/SetPolyphonyEvent.cpp b/src/libs/engine/events/SetPolyphonyEvent.cpp index 7efa7386..2a22da2f 100644 --- a/src/libs/engine/events/SetPolyphonyEvent.cpp +++ b/src/libs/engine/events/SetPolyphonyEvent.cpp @@ -22,7 +22,7 @@ #include "PatchImpl.hpp" #include "ClientBroadcaster.hpp" #include "util.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "PortImpl.hpp" #include "NodeImpl.hpp" #include "ConnectionImpl.hpp" diff --git a/src/libs/engine/events/SetPortValueEvent.cpp b/src/libs/engine/events/SetPortValueEvent.cpp index 9ab6349d..ee9be86e 100644 --- a/src/libs/engine/events/SetPortValueEvent.cpp +++ b/src/libs/engine/events/SetPortValueEvent.cpp @@ -23,7 +23,7 @@ #include "PortImpl.hpp" #include "ClientBroadcaster.hpp" #include "NodeImpl.hpp" -#include "ObjectStore.hpp" +#include "EngineStore.hpp" #include "AudioBuffer.hpp" #include "EventBuffer.hpp" #include "ProcessContext.hpp" diff --git a/src/libs/gui/App.cpp b/src/libs/gui/App.cpp index b558f706..3823b407 100644 --- a/src/libs/gui/App.cpp +++ b/src/libs/gui/App.cpp @@ -32,7 +32,7 @@ #include "serialisation/serialisation.hpp" #include "client/ObjectModel.hpp" #include "client/PatchModel.hpp" -#include "client/Store.hpp" +#include "client/ClientStore.hpp" #include "engine/Engine.hpp" #include "NodeModule.hpp" #include "ControlPanel.hpp" diff --git a/src/libs/gui/App.hpp b/src/libs/gui/App.hpp index f7a3ead1..c6a6c66c 100644 --- a/src/libs/gui/App.hpp +++ b/src/libs/gui/App.hpp @@ -29,7 +29,7 @@ #include <raul/SharedPtr.hpp> #include <redlandmm/World.hpp> #include <module/World.hpp> -#include <interface/Store.hpp> +#include <shared/Store.hpp> using namespace std; diff --git a/src/libs/gui/ConnectWindow.cpp b/src/libs/gui/ConnectWindow.cpp index c9cd948d..9707e5aa 100644 --- a/src/libs/gui/ConnectWindow.cpp +++ b/src/libs/gui/ConnectWindow.cpp @@ -31,7 +31,7 @@ #include "client/OSCClientReceiver.hpp" #include "client/OSCEngineSender.hpp" #include "client/ThreadedSigClientInterface.hpp" -#include "client/Store.hpp" +#include "client/ClientStore.hpp" #include "client/PatchModel.hpp" #include "module/Module.hpp" #include "App.hpp" diff --git a/src/libs/gui/LoadPluginWindow.cpp b/src/libs/gui/LoadPluginWindow.cpp index c518f25f..b2f09ee8 100644 --- a/src/libs/gui/LoadPluginWindow.cpp +++ b/src/libs/gui/LoadPluginWindow.cpp @@ -22,7 +22,7 @@ #include "interface/EngineInterface.hpp" #include "client/NodeModel.hpp" #include "client/PatchModel.hpp" -#include "client/Store.hpp" +#include "client/ClientStore.hpp" #include "App.hpp" #include "LoadPluginWindow.hpp" #include "PatchWindow.hpp" diff --git a/src/libs/gui/NewSubpatchWindow.cpp b/src/libs/gui/NewSubpatchWindow.cpp index def57975..02d3e9e0 100644 --- a/src/libs/gui/NewSubpatchWindow.cpp +++ b/src/libs/gui/NewSubpatchWindow.cpp @@ -19,6 +19,7 @@ #include "interface/EngineInterface.hpp" #include "client/NodeModel.hpp" #include "client/PatchModel.hpp" +#include "client/ClientStore.hpp" #include "NewSubpatchWindow.hpp" #include "PatchView.hpp" diff --git a/src/libs/gui/PatchCanvas.cpp b/src/libs/gui/PatchCanvas.cpp index d7ffd78b..c92eeb43 100644 --- a/src/libs/gui/PatchCanvas.cpp +++ b/src/libs/gui/PatchCanvas.cpp @@ -27,7 +27,7 @@ #include "client/PluginModel.hpp" #include "client/PatchModel.hpp" #include "client/NodeModel.hpp" -#include "client/Store.hpp" +#include "client/ClientStore.hpp" #include "App.hpp" #include "PatchCanvas.hpp" #include "PatchWindow.hpp" diff --git a/src/libs/gui/PatchTreeWindow.cpp b/src/libs/gui/PatchTreeWindow.cpp index 85f4f19c..336d3aaf 100644 --- a/src/libs/gui/PatchTreeWindow.cpp +++ b/src/libs/gui/PatchTreeWindow.cpp @@ -18,7 +18,7 @@ #include <raul/Path.hpp> #include "interface/EngineInterface.hpp" #include "client/OSCEngineSender.hpp" -#include "client/Store.hpp" +#include "client/ClientStore.hpp" #include "client/PatchModel.hpp" #include "App.hpp" #include "PatchTreeWindow.hpp" diff --git a/src/libs/gui/PatchWindow.cpp b/src/libs/gui/PatchWindow.cpp index fc455a87..ad558903 100644 --- a/src/libs/gui/PatchWindow.cpp +++ b/src/libs/gui/PatchWindow.cpp @@ -21,7 +21,7 @@ #include <fstream> #include "interface/EngineInterface.hpp" #include "client/PatchModel.hpp" -#include "client/Store.hpp" +#include "client/ClientStore.hpp" #include "App.hpp" #include "PatchCanvas.hpp" #include "LoadPluginWindow.hpp" diff --git a/src/libs/gui/RenameWindow.cpp b/src/libs/gui/RenameWindow.cpp index d5ef1b24..465b6b1b 100644 --- a/src/libs/gui/RenameWindow.cpp +++ b/src/libs/gui/RenameWindow.cpp @@ -19,7 +19,7 @@ #include <string> #include "interface/EngineInterface.hpp" #include "client/ObjectModel.hpp" -#include "client/Store.hpp" +#include "client/ClientStore.hpp" #include "App.hpp" #include "RenameWindow.hpp" diff --git a/src/libs/serialisation/Serialiser.hpp b/src/libs/serialisation/Serialiser.hpp index 51d89cab..eb3a8810 100644 --- a/src/libs/serialisation/Serialiser.hpp +++ b/src/libs/serialisation/Serialiser.hpp @@ -29,7 +29,7 @@ #include <redlandmm/World.hpp> #include <redlandmm/Model.hpp> #include "interface/GraphObject.hpp" -#include "interface/Store.hpp" +#include "shared/Store.hpp" using namespace Raul; using namespace Ingen::Shared; diff --git a/src/common/interface/Store.hpp b/src/libs/shared/Store.hpp index 428945b9..428945b9 100644 --- a/src/common/interface/Store.hpp +++ b/src/libs/shared/Store.hpp |