diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-25 23:16:01 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-25 23:16:01 +0100 |
commit | e86c292967d85b571344b74fb5eeedf5ebf95aa8 (patch) | |
tree | ee354fc1ef56d0615e96155af7e0b92507d997b1 /src/core/model/Project.cpp | |
parent | 566742c6fa0e1c689cfabd60a7989d7ad48db66c (diff) |
Added missing const and "getSourceContextCallback" function
Diffstat (limited to 'src/core/model/Project.cpp')
-rw-r--r-- | src/core/model/Project.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/core/model/Project.cpp b/src/core/model/Project.cpp index 1452de2..2833b37 100644 --- a/src/core/model/Project.cpp +++ b/src/core/model/Project.cpp @@ -36,8 +36,8 @@ Project::Project(Manager &mgr, Registry ®istry) } Rooted<Node> Project::parse(const std::string &path, const std::string mimetype, - const std::string rel, RttiSet &supportedTypes, - Logger &logger) + const std::string rel, + const RttiSet &supportedTypes, Logger &logger) { ParserScope scope; ParserContext context(this, scope, logger); @@ -47,7 +47,7 @@ Rooted<Node> Project::parse(const std::string &path, const std::string mimetype, Rooted<Node> Project::link(ParserContext &ctx, const std::string &path, const std::string mimetype, const std::string rel, - RttiSet &supportedTypes) + const RttiSet &supportedTypes) { return resourceManager.link(registry, ctx, path, mimetype, rel, supportedTypes); @@ -55,12 +55,19 @@ Rooted<Node> Project::link(ParserContext &ctx, const std::string &path, Rooted<Node> Project::include(ParserContext &ctx, const std::string &path, const std::string mimetype, const std::string rel, - RttiSet &supportedTypes) + const RttiSet &supportedTypes) { return resourceManager.include(registry, ctx, path, mimetype, rel, supportedTypes); } +SourceContextCallback Project::getSourceContextCallback() +{ + return [&](const SourceLocation &location) { + return resourceManager.readContext(location); + }; +} + bool Project::doValidate(Logger &logger) const { return continueValidation(documents, logger); |