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/libs/client/NodeModel.h | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'src/libs/client/NodeModel.h') diff --git a/src/libs/client/NodeModel.h b/src/libs/client/NodeModel.h index af4171ed..05df5ed5 100644 --- a/src/libs/client/NodeModel.h +++ b/src/libs/client/NodeModel.h @@ -21,9 +21,12 @@ #include #include #include +#include #include "ObjectModel.h" #include "PortModel.h" #include "util/Path.h" +#include "util/CountedPtr.h" +#include "PluginModel.h" using std::string; using std::map; using std::find; using std::cout; using std::cerr; using std::endl; @@ -41,11 +44,11 @@ class PluginModel; class NodeModel : public ObjectModel { public: - NodeModel(const Path& node_path); + NodeModel(CountedPtr plugin, const Path& path); virtual ~NodeModel(); - PortModel* get_port(const string& port_name); - void add_port(PortModel* pm); + CountedPtr get_port(const string& port_name); + void add_port(CountedPtr pm); void remove_port(const string& port_path); virtual void clear(); @@ -54,8 +57,8 @@ public: void add_program(int bank, int program, const string& name); void remove_program(int bank, int program); - const PluginModel* plugin() const { return m_plugin; } - void plugin(const PluginModel* const pi) { m_plugin = pi; } + CountedPtr plugin() const { return m_plugin; } + //void plugin(CountedPtr p) { m_plugin = p; } virtual void set_path(const Path& p); @@ -70,10 +73,15 @@ public: PatchModel* parent_patch() const { return (PatchModel*)m_parent; } + // Signals + sigc::signal > new_port_sig; + protected: + NodeModel(const Path& path); + bool m_polyphonic; PortModelList m_ports; ///< List of ports (instead of map to preserve order) - const PluginModel* m_plugin; ///< The plugin this node is an instance of + CountedPtr m_plugin; ///< The plugin this node is an instance of float m_x; ///< Just metadata, here as an optimization for OmGtk float m_y; ///< Just metadata, here as an optimization for OmGtk map > m_banks; ///< DSSI banks @@ -85,7 +93,7 @@ private: }; -typedef map NodeModelMap; +typedef map > NodeModelMap; } // namespace LibOmClient -- cgit v1.2.1