summaryrefslogtreecommitdiffstats
path: root/src/progs/gtk/Store.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-06-11 03:17:16 +0000
committerDavid Robillard <d@drobilla.net>2006-06-11 03:17:16 +0000
commit228279d6717e69ffd2d2a886244179635ac27c2b (patch)
treed8a25007daeda686f07aefc8b5fcc9486040c536 /src/progs/gtk/Store.h
parent9a3d8d0604a2f81e3514e8a1a30aaf41aadf73a2 (diff)
downloadingen-228279d6717e69ffd2d2a886244179635ac27c2b.tar.gz
ingen-228279d6717e69ffd2d2a886244179635ac27c2b.tar.bz2
ingen-228279d6717e69ffd2d2a886244179635ac27c2b.zip
Got store working directly through SigClientInterface
git-svn-id: http://svn.drobilla.net/lad/grauph@22 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs/gtk/Store.h')
-rw-r--r--src/progs/gtk/Store.h36
1 files changed, 22 insertions, 14 deletions
diff --git a/src/progs/gtk/Store.h b/src/progs/gtk/Store.h
index 9fb4b270..d3bcbf94 100644
--- a/src/progs/gtk/Store.h
+++ b/src/progs/gtk/Store.h
@@ -20,17 +20,22 @@
#include <cassert>
#include <string>
#include <map>
+#include "util/CountedPtr.h"
using std::string; using std::map;
-namespace LibOmClient { class PatchModel; class PluginModel; class SigClientInterface; }
+namespace LibOmClient {
+ class SigClientInterface;
+ class ObjectModel;
+ class PluginModel;
+ class PatchModel;
+ class NodeModel;
+ class PortModel;
+}
using namespace LibOmClient;
namespace OmGtk {
-class GtkObjectController;
-class PatchController;
-class NodeController;
-class PortController;
+
/** Singeton which holds all "Om Objects" for easy/fast lookup
*
@@ -38,14 +43,11 @@ class PortController;
*/
class Store {
public:
- GtkObjectController* object(const string& path) const;
- PatchController* patch(const string& path) const;
- NodeController* node(const string& path) const;
- PortController* port(const string& path) const;
+ CountedPtr<ObjectModel> object(const string& path) const;
+ CountedPtr<PatchModel> patch(const string& path) const;
+ CountedPtr<NodeModel> node(const string& path) const;
+ CountedPtr<PortModel> port(const string& path) const;
- void add_object(GtkObjectController* object);
- void remove_object(GtkObjectController* object);
-
size_t num_objects() { return m_objects.size(); }
void add_plugin(const PluginModel* pm);
@@ -61,12 +63,18 @@ private:
static Store* _instance;
+ void add_object(ObjectModel* object);
+ void remove_object(ObjectModel* object);
+
// Slots for SigClientInterface signals
void destruction_event(const string& path);
void new_plugin_event(const string& type, const string& uri, const string& name);
+ void new_patch_event(const string& path, uint32_t poly);
+ void new_node_event(const string& plugin_type, const string& plugin_uri, const string& node_path, bool is_polyphonic, uint32_t num_ports);
+ void new_port_event(const string& path, const string& data_type, bool is_output);
- map<string, GtkObjectController*> m_objects; ///< Keyed by Om path
- map<string, const PluginModel*> m_plugins; ///< Keyed by URI
+ map<string, ObjectModel*> m_objects; ///< Keyed by Om path
+ map<string, const PluginModel*> m_plugins; ///< Keyed by URI
};