From e86c292967d85b571344b74fb5eeedf5ebf95aa8 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Sun, 25 Jan 2015 23:16:01 +0100 Subject: Added missing const and "getSourceContextCallback" function --- src/core/model/Project.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/core/model/Project.cpp') 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 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 Project::parse(const std::string &path, const std::string mimetype, Rooted 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 Project::link(ParserContext &ctx, const std::string &path, Rooted 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); -- cgit v1.2.3