diff options
author | David Robillard <d@drobilla.net> | 2006-09-14 02:27:02 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-09-14 02:27:02 +0000 |
commit | cc384f6f622cc10fd83616256080b80dc2123aaf (patch) | |
tree | 9a5f0d7f14e04ad7effcda8be6b5924b4d61e361 /src/libs/client/NodeModel.h | |
parent | 5525b33b79b7a920cf374704e67fc6b16fe5f77c (diff) | |
download | ingen-cc384f6f622cc10fd83616256080b80dc2123aaf.tar.gz ingen-cc384f6f622cc10fd83616256080b80dc2123aaf.tar.bz2 ingen-cc384f6f622cc10fd83616256080b80dc2123aaf.zip |
Cleaned up client-side model code significantly (made everything private
so only Store can change the state of models).
Extremely broken, just committing to move code between machines :).
git-svn-id: http://svn.drobilla.net/lad/ingen@133 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client/NodeModel.h')
-rw-r--r-- | src/libs/client/NodeModel.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/libs/client/NodeModel.h b/src/libs/client/NodeModel.h index f9c87f6e..2bce6656 100644 --- a/src/libs/client/NodeModel.h +++ b/src/libs/client/NodeModel.h @@ -35,6 +35,7 @@ namespace Ingen { namespace Client { class PluginModel; +class Store; /** Node model class, used by the client to store engine's state. @@ -44,18 +45,16 @@ class PluginModel; class NodeModel : public ObjectModel { public: - NodeModel(const string& plugin_uri, const Path& path, bool polyphonic); - NodeModel(CountedPtr<PluginModel> plugin, const Path& path, bool polyphonic); virtual ~NodeModel(); CountedPtr<PortModel> get_port(const string& port_name) const; const map<int, map<int, string> >& get_programs() const { return m_banks; } - const string& plugin_uri() const { return m_plugin_uri; } - CountedPtr<PluginModel> 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; } + const string& plugin_uri() const { return m_plugin_uri; } + CountedPtr<PluginModel> 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<void, CountedPtr<PortModel> > new_port_sig; @@ -63,16 +62,19 @@ public: protected: friend class Store; + + NodeModel(const string& plugin_uri, const Path& path, bool polyphonic); + NodeModel(CountedPtr<PluginModel> plugin, const Path& path, bool polyphonic); + NodeModel(const Path& path); void add_child(CountedPtr<ObjectModel> c); void remove_child(CountedPtr<ObjectModel> c); void add_port(CountedPtr<PortModel> pm); void remove_port(CountedPtr<PortModel> pm); - void remove_port(const string& port_path); + void remove_port(const Path& port_path); void add_program(int bank, int program, const string& name); void remove_program(int bank, int program); - //void plugin(CountedPtr<PluginModel> p) { m_plugin = p; } virtual void clear(); @@ -86,8 +88,6 @@ protected: map<int, map<int, string> > m_banks; ///< DSSI banks private: - friend class PatchLibrarian; // FIXME: remove - // Prevent copies (undefined) NodeModel(const NodeModel& copy); NodeModel& operator=(const NodeModel& copy); |