From 0b1c17f08f8eab4ada52ee98ba7353ec0260d3eb Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 11 Jun 2006 23:33:00 +0000 Subject: New nodes in gtk client working through Store signal interface git-svn-id: http://svn.drobilla.net/lad/grauph@26 a436a847-0d15-0410-975c-d299462d15a1 --- src/progs/gtk/Store.h | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'src/progs/gtk/Store.h') diff --git a/src/progs/gtk/Store.h b/src/progs/gtk/Store.h index d3bcbf94..c3e465c0 100644 --- a/src/progs/gtk/Store.h +++ b/src/progs/gtk/Store.h @@ -17,6 +17,9 @@ #ifndef STORE_H #define STORE_H +// FIXME: for CountedPtr +#define WITH_RTTI + #include #include #include @@ -43,15 +46,16 @@ namespace OmGtk { */ class Store { public: - CountedPtr object(const string& path) const; - CountedPtr patch(const string& path) const; - CountedPtr node(const string& path) const; - CountedPtr port(const string& path) const; + CountedPtr plugin(const string& uri); + CountedPtr object(const string& path); + CountedPtr patch(const string& path); + CountedPtr node(const string& path); + CountedPtr port(const string& path); size_t num_objects() { return m_objects.size(); } - void add_plugin(const PluginModel* pm); - const map& plugins() const { return m_plugins; } + + const map >& plugins() const { return m_plugins; } static void instantiate(SigClientInterface& emitter) { if (!_instance) _instance = new Store(emitter); } @@ -63,8 +67,10 @@ private: static Store* _instance; - void add_object(ObjectModel* object); - void remove_object(ObjectModel* object); + void add_object(CountedPtr object); + CountedPtr remove_object(const string& path); + + void add_plugin(CountedPtr plugin); // Slots for SigClientInterface signals void destruction_event(const string& path); @@ -73,8 +79,8 @@ private: 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 m_objects; ///< Keyed by Om path - map m_plugins; ///< Keyed by URI + map > m_objects; ///< Keyed by Om path + map > m_plugins; ///< Keyed by URI }; -- cgit v1.2.1