summaryrefslogtreecommitdiffstats
path: root/ingen
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-04-03 06:11:55 +0000
committerDavid Robillard <d@drobilla.net>2015-04-03 06:11:55 +0000
commit5ecd4d401e50eb3f86461eb48e41a01c1d40da55 (patch)
treef8ee587eb08a96dc9e1bbc81ce6169e0a5661b4d /ingen
parent85aaff2bf3420e7c4a1d4db3c093c589b0c25e78 (diff)
downloadingen-5ecd4d401e50eb3f86461eb48e41a01c1d40da55.tar.gz
ingen-5ecd4d401e50eb3f86461eb48e41a01c1d40da55.tar.bz2
ingen-5ecd4d401e50eb3f86461eb48e41a01c1d40da55.zip
Fix loading graphs with explicit/non-file URIs.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5650 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'ingen')
-rw-r--r--ingen/Parser.hpp23
1 files changed, 22 insertions, 1 deletions
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 <string>
-#include <list>
+#include <set>
#include <boost/optional.hpp>
@@ -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<ResourceRecord> find_resources(
+ Sord::World& world,
+ const std::string& manifest_uri,
+ const Raul::URI& type_uri);
+
virtual bool parse_file(
World* world,
Interface* target,