diff options
author | David Robillard <d@drobilla.net> | 2006-06-19 06:17:49 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-06-19 06:17:49 +0000 |
commit | 2db1897709eba0e80677bd09e8444e7320e15120 (patch) | |
tree | 8062b5ede632c1c084a2c3b43bbd1a3d9991734e /src/libs/client/Store.cpp | |
parent | 4adc4f4a2b4f57f43affcd48f2c01c60f471b20a (diff) | |
download | ingen-2db1897709eba0e80677bd09e8444e7320e15120.tar.gz ingen-2db1897709eba0e80677bd09e8444e7320e15120.tar.bz2 ingen-2db1897709eba0e80677bd09e8444e7320e15120.zip |
Connecting of patch ports internally (seemingly anyway, data not flowing yet)
git-svn-id: http://svn.drobilla.net/lad/grauph@61 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client/Store.cpp')
-rw-r--r-- | src/libs/client/Store.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/libs/client/Store.cpp b/src/libs/client/Store.cpp index 542c1bc5..15f91786 100644 --- a/src/libs/client/Store.cpp +++ b/src/libs/client/Store.cpp @@ -311,24 +311,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) +Store::connection_event(const Path& src_port_path, const Path& 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(); + // ConnectionModel has the clever patch-path-figuring-out stuff in it, so + // just make one right away to get at that + ConnectionModel* cm = new ConnectionModel(src_port_path, dst_port_path); - CountedPtr<PatchModel> patch = this->patch(patch_path); + CountedPtr<PatchModel> patch = this->patch(cm->patch_path()); if (patch) - patch->add_connection(new ConnectionModel(src, dst)); + patch->add_connection(cm); else cerr << "ERROR: connection in nonexistant patch" << endl; } void -Store::disconnection_event(const string& src_port_path, const string& dst_port_path) +Store::disconnection_event(const Path& src_port_path, const Path& dst_port_path) { const Path& src = src_port_path; const Path& dst = dst_port_path; |