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/ConnectionModel.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/ConnectionModel.h')
-rw-r--r-- | src/libs/client/ConnectionModel.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/libs/client/ConnectionModel.h b/src/libs/client/ConnectionModel.h index fe244649..4c0d18f8 100644 --- a/src/libs/client/ConnectionModel.h +++ b/src/libs/client/ConnectionModel.h @@ -14,7 +14,6 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - #ifndef CONNECTIONMODEL_H #define CONNECTIONMODEL_H @@ -28,6 +27,8 @@ using std::string; namespace Ingen { namespace Client { +class Store; + /** Class to represent a port->port connection in the engine. * @@ -42,23 +43,25 @@ namespace Client { class ConnectionModel { public: - ConnectionModel(const Path& src_port, const Path& dst_port); - ConnectionModel(CountedPtr<PortModel> src, CountedPtr<PortModel> dst); - CountedPtr<PortModel> src_port() const { return _src_port; } CountedPtr<PortModel> dst_port() const { return _dst_port; } - void set_src_port(CountedPtr<PortModel> port) { _src_port = port; _src_port_path = port->path(); } - void set_dst_port(CountedPtr<PortModel> port) { _dst_port = port; _dst_port_path = port->path(); } - - void src_port_path(const string& s) { _src_port_path = s; } - void dst_port_path(const string& s) { _dst_port_path = s; } - const Path& src_port_path() const; const Path& dst_port_path() const; const Path patch_path() const; private: + friend class Store; + + ConnectionModel(const Path& src_port, const Path& dst_port); + ConnectionModel(CountedPtr<PortModel> src, CountedPtr<PortModel> dst); + + void set_src_port(CountedPtr<PortModel> port) { _src_port = port; _src_port_path = port->path(); } + void set_dst_port(CountedPtr<PortModel> port) { _dst_port = port; _dst_port_path = port->path(); } + + void src_port_path(const string& s) { _src_port_path = s; } + void dst_port_path(const string& s) { _dst_port_path = s; } + Path _src_port_path; ///< Only used if _src_port == NULL Path _dst_port_path; ///< Only used if _dst_port == NULL CountedPtr<PortModel> _src_port; |