summaryrefslogtreecommitdiff
path: root/src/core/Registry.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/Registry.hpp')
-rw-r--r--src/core/Registry.hpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/core/Registry.hpp b/src/core/Registry.hpp
index 235e427..01d57e8 100644
--- a/src/core/Registry.hpp
+++ b/src/core/Registry.hpp
@@ -22,6 +22,8 @@
#include <map>
#include <vector>
+#include "ResourceLocator.hpp"
+
namespace ousia {
// TODO: Add support for ScriptEngine type
@@ -35,15 +37,22 @@ class Parser;
class Registry {
private:
Logger &logger;
- std::vector<parser::Parser*> parsers;
- std::map<std::string, parser::Parser*> parserMimetypes;
+ std::vector<parser::Parser *> parsers;
+ std::map<std::string, parser::Parser *> parserMimetypes;
+ std::vector<ResourceLocator *> locators;
public:
Registry(Logger &logger) : logger(logger) {}
void registerParser(parser::Parser *parser);
- parser::Parser *getParserForMimetype(std::string mimetype);
+ parser::Parser *getParserForMimetype(const std::string& mimetype) const;
+
+ void registerResourceLocator(ResourceLocator *locator);
+
+ ResourceLocator::Location locateResource(const std::string &path,
+ const std::string &relativeTo,
+ ResourceLocator::Type type) const;
};
}