From 50b423ce8ea6d8cb6a8ab24d399770a3f697f03a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 9 Jun 2008 15:53:51 +0000 Subject: Fix internal Patch->Patch connection loading. git-svn-id: http://svn.drobilla.net/lad/ingen@1241 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/serialisation/Loader.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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 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 */ -- cgit v1.2.1