summaryrefslogtreecommitdiffstats
path: root/src/libs/serialisation/Loader.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-06-09 15:53:51 +0000
committerDavid Robillard <d@drobilla.net>2008-06-09 15:53:51 +0000
commit50b423ce8ea6d8cb6a8ab24d399770a3f697f03a (patch)
tree63d4ba0a9cac79143ec3f47d7e1ee99a5a059fe5 /src/libs/serialisation/Loader.cpp
parent6e1958dbf0a42d3fc61e50ef87144c6dccdaa5f9 (diff)
downloadingen-50b423ce8ea6d8cb6a8ab24d399770a3f697f03a.tar.gz
ingen-50b423ce8ea6d8cb6a8ab24d399770a3f697f03a.tar.bz2
ingen-50b423ce8ea6d8cb6a8ab24d399770a3f697f03a.zip
Fix internal Patch->Patch connection loading.
git-svn-id: http://svn.drobilla.net/lad/ingen@1241 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/serialisation/Loader.cpp')
-rw-r--r--src/libs/serialisation/Loader.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/libs/serialisation/Loader.cpp b/src/libs/serialisation/Loader.cpp
index 162589b6..88b0a6a3 100644
--- a/src/libs/serialisation/Loader.cpp
+++ b/src/libs/serialisation/Loader.cpp
@@ -343,6 +343,29 @@ Loader::load(SharedPtr<EngineInterface> engine,
engine->connect(src_port, dst_port);
}
+
+
+ /* This Patch -> This Patch connections */
+
+ query = Redland::Query(*rdf_world, Glib::ustring(
+ "SELECT DISTINCT ?srcname ?dstname WHERE {\n") +
+ patch_uri + " ingen:port ?src ;\n"
+ " ingen:port ?dst .\n"
+ "?dst ingen:connectedTo ?src ;\n"
+ " ingen:name ?dstname .\n"
+ "?src ingen:name ?srcname .\n"
+ "}\n");
+
+ results = query.run(*rdf_world, model);
+
+ for (Redland::Query::Results::iterator i = results.begin(); i != results.end(); ++i) {
+ Path src_port = patch_path.base() + Path::nameify((*i)["srcname"].to_string());
+ Path dst_port = patch_path.base() + Path::nameify((*i)["dstname"].to_string());
+
+ //cerr << patch_path << " 4 CONNECTION: " << src_port << " -> " << dst_port << endl;
+
+ engine->connect(src_port, dst_port);
+ }
/* Load variables */