summaryrefslogtreecommitdiffstats
path: root/src/libs/client/Store.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-06-12 01:13:38 +0000
committerDavid Robillard <d@drobilla.net>2006-06-12 01:13:38 +0000
commit699d3265031702602bdf4d6748b43ff14f2af72f (patch)
treed0b2e4c0a1f61ad968e9aa9b20bcedcf076a821e /src/libs/client/Store.cpp
parent190e2cf3c91f8bd5b1a6f69d00e84a108c743898 (diff)
downloadingen-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/Store.cpp')
-rw-r--r--src/libs/client/Store.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/libs/client/Store.cpp b/src/libs/client/Store.cpp
index 65b3080e..cd52af70 100644
--- a/src/libs/client/Store.cpp
+++ b/src/libs/client/Store.cpp
@@ -33,6 +33,7 @@ Store::Store(SigClientInterface& emitter)
emitter.new_patch_sig.connect(sigc::mem_fun(this, &Store::new_patch_event));
emitter.new_node_sig.connect(sigc::mem_fun(this, &Store::new_node_event));
emitter.new_port_sig.connect(sigc::mem_fun(this, &Store::new_port_event));
+ emitter.connection_sig.connect(sigc::mem_fun(this, &Store::connection_event));
emitter.metadata_update_sig.connect(sigc::mem_fun(this, &Store::metadata_update_event));
}
@@ -271,5 +272,22 @@ Store::metadata_update_event(const string& subject_path, const string& predicate
}
+void
+Store::connection_event(const string& src_port_path, const string& dst_port_path)
+{
+ const Path& src = src_port_path;
+ const Path& dst = dst_port_path;
+
+ assert(src.parent().parent() == dst.parent().parent());
+ const Path& patch_path = src.parent().parent();
+
+ CountedPtr<PatchModel> patch = this->patch(patch_path);
+ if (patch)
+ patch->add_connection(new ConnectionModel(src, dst));
+ else
+ cerr << "ERROR: connection in nonexistant patch" << endl;
+}
+
+
} // namespace LibOmClient