diff options
author | David Robillard <d@drobilla.net> | 2006-06-12 01:13:38 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-06-12 01:13:38 +0000 |
commit | 699d3265031702602bdf4d6748b43ff14f2af72f (patch) | |
tree | d0b2e4c0a1f61ad968e9aa9b20bcedcf076a821e /src/libs/client/PatchModel.h | |
parent | 190e2cf3c91f8bd5b1a6f69d00e84a108c743898 (diff) | |
download | ingen-699d3265031702602bdf4d6748b43ff14f2af72f.tar.gz ingen-699d3265031702602bdf4d6748b43ff14f2af72f.tar.bz2 ingen-699d3265031702602bdf4d6748b43ff14f2af72f.zip |
Connections working through Store model/signal interface
git-svn-id: http://svn.drobilla.net/lad/grauph@30 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client/PatchModel.h')
-rw-r--r-- | src/libs/client/PatchModel.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libs/client/PatchModel.h b/src/libs/client/PatchModel.h index 15677c50..0f8dcd12 100644 --- a/src/libs/client/PatchModel.h +++ b/src/libs/client/PatchModel.h @@ -24,13 +24,12 @@ #include <sigc++/sigc++.h> #include "NodeModel.h" #include "util/CountedPtr.h" +#include "ConnectionModel.h" using std::list; using std::string; using std::map; namespace LibOmClient { -class ConnectionModel; - /** Client's model of a patch. * @@ -46,7 +45,7 @@ public: {} const NodeModelMap& nodes() const { return m_nodes; } - const list<ConnectionModel*>& connections() const { return m_connections; } + const list<CountedPtr<ConnectionModel> >& connections() const { return m_connections; } virtual void set_path(const Path& path); @@ -56,8 +55,8 @@ public: void rename_node(const Path& old_path, const Path& new_path); void rename_node_port(const Path& old_path, const Path& new_path); - ConnectionModel* get_connection(const string& src_port_path, const string& dst_port_path); - void add_connection(ConnectionModel* cm); + CountedPtr<ConnectionModel> get_connection(const string& src_port_path, const string& dst_port_path); + void add_connection(CountedPtr<ConnectionModel> cm); void remove_connection(const string& src_port_path, const string& dst_port_path); virtual void clear(); @@ -71,7 +70,8 @@ public: bool polyphonic() const; // Signals - sigc::signal<void, CountedPtr<NodeModel> > new_node_sig; + sigc::signal<void, CountedPtr<NodeModel> > new_node_sig; + sigc::signal<void, CountedPtr<ConnectionModel> > new_connection_sig; private: // Prevent copies (undefined) @@ -79,7 +79,7 @@ private: PatchModel& operator=(const PatchModel& copy); NodeModelMap m_nodes; - list<ConnectionModel*> m_connections; + list<CountedPtr<ConnectionModel> > m_connections; string m_filename; bool m_enabled; size_t m_poly; |