summaryrefslogtreecommitdiffstats
path: root/src/client/ClientStore.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-13 04:05:32 +0000
committerDavid Robillard <d@drobilla.net>2009-05-13 04:05:32 +0000
commit19928bb583e72802746b89e322f71ecc0fcb7427 (patch)
tree95912dc84d8c9dcf57939398514feaf148c1cd63 /src/client/ClientStore.hpp
parent96f839e64de70a23210847e322d24690299287fe (diff)
downloadingen-19928bb583e72802746b89e322f71ecc0fcb7427.tar.gz
ingen-19928bb583e72802746b89e322f71ecc0fcb7427.tar.bz2
ingen-19928bb583e72802746b89e322f71ecc0fcb7427.zip
The great ID refactoring of 2009.
Path is now actually URI (scheme path: for now). Therefore ingen nodes and such live in the same namespace as ... well, everything. Including plugins. Thar be profit, laddies. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1992 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/client/ClientStore.hpp')
-rw-r--r--src/client/ClientStore.hpp84
1 files changed, 24 insertions, 60 deletions
diff --git a/src/client/ClientStore.hpp b/src/client/ClientStore.hpp
index d3ab2978..9fb95b0b 100644
--- a/src/client/ClientStore.hpp
+++ b/src/client/ClientStore.hpp
@@ -31,11 +31,6 @@
namespace Raul { class Atom; }
-using namespace std;
-using Ingen::Shared::EngineInterface;
-using Raul::Path;
-using Raul::Atom;
-
namespace Ingen {
namespace Shared { class GraphObject; }
@@ -57,37 +52,34 @@ class ConnectionModel;
*/
class ClientStore : public Shared::Store, public Shared::CommonInterface, public sigc::trackable {
public:
- ClientStore(SharedPtr<EngineInterface> engine=SharedPtr<EngineInterface>(),
+ ClientStore(SharedPtr<Shared::EngineInterface> engine=SharedPtr<Shared::EngineInterface>(),
SharedPtr<SigClientInterface> emitter=SharedPtr<SigClientInterface>());
- SharedPtr<PluginModel> plugin(const string& uri);
- SharedPtr<ObjectModel> object(const Path& path);
+ SharedPtr<PluginModel> plugin(const Raul::URI& uri);
+ SharedPtr<ObjectModel> object(const Raul::Path& path);
void clear();
- typedef Raul::Table<string, SharedPtr<PluginModel> > Plugins;
+ typedef Raul::Table<Raul::URI, SharedPtr<PluginModel> > Plugins;
SharedPtr<const Plugins> plugins() const { return _plugins; }
SharedPtr<Plugins> plugins() { return _plugins; }
void set_plugins(SharedPtr<Plugins> p) { _plugins = p; }
// CommonInterface
- void new_plugin(const string& uri, const string& type_uri, const string& symbol);
+ void new_plugin(const Raul::URI& uri, const Raul::URI& type_uri, const Raul::Symbol& symbol);
bool new_object(const Shared::GraphObject* object);
- void new_patch(const string& path, uint32_t poly);
- void new_node(const string& path, const string& plugin_uri);
- void new_port(const string& path, const string& type, uint32_t index, bool is_output);
- void rename(const string& old_path, const string& new_path);
- void set_variable(const string& subject_path, const string& predicate, const Atom& value);
- void set_property(const string& subject_path, const string& predicate, const Atom& value);
- void set_port_value(const string& port_path, const Raul::Atom& value);
- void set_voice_value(const string& port_path, uint32_t voice, const Raul::Atom& value);
- void connect(const string& src_port_path, const string& dst_port_path);
- void disconnect(const string& src_port_path, const string& dst_port_path);
- void destroy(const string& path);
+ void new_patch(const Raul::Path& path, uint32_t poly);
+ void new_node(const Raul::Path& path, const Raul::URI& plugin_uri);
+ void new_port(const Raul::Path& path, const Raul::URI& type, uint32_t index, bool is_output);
+ void rename(const Raul::Path& old_path, const Raul::Path& new_path);
+ void set_variable(const Raul::Path& subject_path, const Raul::URI& predicate, const Raul::Atom& value);
+ void set_property(const Raul::Path& subject_path, const Raul::URI& predicate, const Raul::Atom& value);
+ void set_port_value(const Raul::Path& port_path, const Raul::Atom& value);
+ void set_voice_value(const Raul::Path& port_path, uint32_t voice, const Raul::Atom& value);
+ void connect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path);
+ void disconnect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path);
+ void destroy(const Raul::Path& path);
- typedef list< std::pair<Path, Path> > ConnectionRecords;
- const ConnectionRecords& connection_records() { return _connection_orphans; }
-
sigc::signal<void, SharedPtr<ObjectModel> > signal_new_object;
sigc::signal<void, SharedPtr<PluginModel> > signal_new_plugin;
@@ -96,56 +88,28 @@ private:
void add(Shared::GraphObject* o) { throw; }
void add_object(SharedPtr<ObjectModel> object);
- SharedPtr<ObjectModel> remove_object(const Path& path);
+ SharedPtr<ObjectModel> remove_object(const Raul::Path& path);
void add_plugin(SharedPtr<PluginModel> plugin);
- SharedPtr<PatchModel> connection_patch(const Path& src_port_path, const Path& dst_port_path);
+ SharedPtr<PatchModel> connection_patch(const Raul::Path& src_port_path, const Raul::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);
-
void bundle_begin() {}
void bundle_end() {}
// Slots for SigClientInterface signals
- void object_renamed(const Path& old_path, const Path& new_path);
- void clear_patch(const std::string& path);
- void activity(const Path& path);
+ void object_renamed(const Raul::Path& old_path, const Raul::Path& new_path);
+ void clear_patch(const Raul::Path& path);
+ void activity(const Raul::Path& path);
- bool attempt_connection(const Path& src_port_path, const Path& dst_port_path, bool add_orphan=false);
+ bool attempt_connection(const Raul::Path& src_port_path, const Raul::Path& dst_port_path, bool add_orphan=false);
bool _handle_orphans;
- SharedPtr<EngineInterface> _engine;
- SharedPtr<SigClientInterface> _emitter;
+ SharedPtr<Shared::EngineInterface> _engine;
+ SharedPtr<SigClientInterface> _emitter;
SharedPtr<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 */
- ConnectionRecords _connection_orphans;
};