From e5675ebfeb93175e16762d0a078bd51d15d05f63 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 13 Sep 2006 06:11:25 +0000 Subject: Heavy-duty redesign of client library and GUI (now fully signal driven with clean Model/View separation). Smarter, centralized window creation/management (should make window unification easy (panes?)). Typed metadata system, no more fugly string conversion of floats. Supports OSC fundamental types string, int, float, blob for now (though blob isn't working over the wire yet). git-svn-id: http://svn.drobilla.net/lad/ingen@131 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/client/NodeModel.h | 67 +++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 36 deletions(-) (limited to 'src/libs/client/NodeModel.h') diff --git a/src/libs/client/NodeModel.h b/src/libs/client/NodeModel.h index 60973d95..f9c87f6e 100644 --- a/src/libs/client/NodeModel.h +++ b/src/libs/client/NodeModel.h @@ -44,55 +44,50 @@ class PluginModel; class NodeModel : public ObjectModel { public: - NodeModel(const string& plugin_uri, const Path& path); - NodeModel(CountedPtr plugin, const Path& path); + NodeModel(const string& plugin_uri, const Path& path, bool polyphonic); + NodeModel(CountedPtr plugin, const Path& path, bool polyphonic); virtual ~NodeModel(); - - void add_child(CountedPtr c); - void remove_child(CountedPtr c); - - CountedPtr get_port(const string& port_name); - void add_port(CountedPtr pm); - void remove_port(CountedPtr pm); - void remove_port(const string& port_path); - - virtual void clear(); - - const map >& get_programs() const { return m_banks; } - void add_program(int bank, int program, const string& name); - void remove_program(int bank, int program); - - string plugin_uri() { return m_plugin_uri; } - CountedPtr plugin() const { return m_plugin; } - //void plugin(CountedPtr p) { m_plugin = p; } + CountedPtr get_port(const string& port_name) const; - virtual void set_path(const Path& p); - - int num_ports() const { return m_ports.size(); } - const PortModelList& ports() const { return m_ports; } - virtual bool polyphonic() const { return m_polyphonic; } - void polyphonic(bool b) { m_polyphonic = b; } - float x() const { return m_x; } - float y() const { return m_y; } - void x(float a); - void y(float a); + const map >& get_programs() const { return m_banks; } + const string& plugin_uri() const { return m_plugin_uri; } + CountedPtr plugin() const { return m_plugin; } + int num_ports() const { return m_ports.size(); } + const PortModelList& ports() const { return m_ports; } + virtual bool polyphonic() const { return m_polyphonic; } // Signals sigc::signal > new_port_sig; + sigc::signal > removed_port_sig; protected: + friend class Store; NodeModel(const Path& path); + void add_child(CountedPtr c); + void remove_child(CountedPtr c); + void add_port(CountedPtr pm); + void remove_port(CountedPtr pm); + void remove_port(const string& port_path); + void add_program(int bank, int program, const string& name); + void remove_program(int bank, int program); + + + //void plugin(CountedPtr p) { m_plugin = p; } + virtual void clear(); + + friend class PatchModel; + void set_path(const Path& p); bool m_polyphonic; - PortModelList m_ports; ///< List of ports (instead of map to preserve order) - string m_plugin_uri; ///< Plugin URI (not redundant if PluginModel unknown - CountedPtr m_plugin; ///< The plugin this node is an instance of - float m_x; ///< Just metadata, here as an optimization for GUI - float m_y; ///< Just metadata, here as an optimization for GUI - map > m_banks; ///< DSSI banks + PortModelList m_ports; ///< List of ports (not a map to preserve order) + string m_plugin_uri; ///< Plugin URI (if PluginModel is unknown) + CountedPtr m_plugin; ///< The plugin this node is an instance of + map > m_banks; ///< DSSI banks private: + friend class PatchLibrarian; // FIXME: remove + // Prevent copies (undefined) NodeModel(const NodeModel& copy); NodeModel& operator=(const NodeModel& copy); -- cgit v1.2.1