From 8a69f9bdbf45a049d9dbb93a198dd92bda733927 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 12 Mar 2012 07:37:52 +0000 Subject: Move bundle patch finding stuff to ingen_lv2.cpp and simplify it to not require the World. Remove all the heavyweight initialisation stuff from plugin library instantiation, just parse the manifest with Sord directly and don't initialise the World until the plugin is actually loaded. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4056 a436a847-0d15-0410-975c-d299462d15a1 --- src/serialisation/Parser.cpp | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'src/serialisation') diff --git a/src/serialisation/Parser.cpp b/src/serialisation/Parser.cpp index 1477e167..b84bedae 100644 --- a/src/serialisation/Parser.cpp +++ b/src/serialisation/Parser.cpp @@ -538,37 +538,6 @@ Parser::Parser(Ingen::Shared::World& world) { } -Parser::PatchRecords -Parser::find_patches(Ingen::Shared::World* world, - SerdEnv* env, - const Glib::ustring& manifest_uri) -{ - const Sord::URI ingen_Patch (*world->rdf_world(), NS_INGEN "Patch"); - const Sord::URI rdf_type (*world->rdf_world(), NS_RDF "type"); - const Sord::URI rdfs_seeAlso(*world->rdf_world(), NS_RDFS "seeAlso"); - - Sord::Model model(*world->rdf_world(), manifest_uri); - model.load_file(env, SERD_TURTLE, manifest_uri); - - std::list records; - for (Sord::Iter i = model.find(nil, rdf_type, ingen_Patch); !i.end(); ++i) { - const Sord::Node patch = i.get_subject(); - Sord::Iter f = model.find(patch, rdfs_seeAlso, nil); - std::string patch_uri_str = patch.to_c_string(); - if (patch_uri_str[0] == '/') { - // FIXME: Kludge path to be a proper URI (not sure why this is happening) - patch_uri_str = string("file://") + patch_uri_str; - } - if (!f.end()) { - records.push_back(PatchRecord(patch_uri_str, - f.get_object().to_c_string())); - } else { - LOG(error) << "Patch has no rdfs:seeAlso" << endl; - } - } - return records; -} - /** Parse a patch from RDF into a CommonInterface (engine or client). * @return whether or not load was successful. */ -- cgit v1.2.1