From 5ecd4d401e50eb3f86461eb48e41a01c1d40da55 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 3 Apr 2015 06:11:55 +0000 Subject: Fix loading graphs with explicit/non-file URIs. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5650 a436a847-0d15-0410-975c-d299462d15a1 --- ingen/Parser.hpp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'ingen/Parser.hpp') diff --git a/ingen/Parser.hpp b/ingen/Parser.hpp index f5045848..59783459 100644 --- a/ingen/Parser.hpp +++ b/ingen/Parser.hpp @@ -18,7 +18,7 @@ #define INGEN_PARSER_HPP #include -#include +#include #include @@ -26,6 +26,7 @@ #include "ingen/ingen.h" #include "raul/Path.hpp" #include "raul/URI.hpp" +#include "sord/sordmm.hpp" namespace Ingen { @@ -45,6 +46,26 @@ public: typedef Node::Properties Properties; + /** Record of a resource listed in a bundle manifest. */ + struct ResourceRecord { + inline ResourceRecord(const std::string& u, const std::string& f) + : uri(u), filename(f) + {} + + inline bool operator<(const ResourceRecord& r) const { + return uri < r.uri; + } + + std::string uri; ///< URI of resource (e.g. a Graph) + std::string filename; ///< Path of describing file (seeAlso) + }; + + /** Find all resources of a given type listed in a manifest file. */ + virtual std::set find_resources( + Sord::World& world, + const std::string& manifest_uri, + const Raul::URI& type_uri); + virtual bool parse_file( World* world, Interface* target, -- cgit v1.2.1