summaryrefslogtreecommitdiff
path: root/src/core/model/Project.cpp
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-01-25 23:16:01 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-01-25 23:16:01 +0100
commite86c292967d85b571344b74fb5eeedf5ebf95aa8 (patch)
treeee354fc1ef56d0615e96155af7e0b92507d997b1 /src/core/model/Project.cpp
parent566742c6fa0e1c689cfabd60a7989d7ad48db66c (diff)
Added missing const and "getSourceContextCallback" function
Diffstat (limited to 'src/core/model/Project.cpp')
-rw-r--r--src/core/model/Project.cpp15
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 &registry)
}
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);