From 4373ba6a600785db93b97afb5daa53dc14a17d19 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Sun, 25 Jan 2015 21:58:34 +0100 Subject: added parse, link and include functions to Project --- src/core/model/Project.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/core/model/Project.cpp') diff --git a/src/core/model/Project.cpp b/src/core/model/Project.cpp index a298ffc..1452de2 100644 --- a/src/core/model/Project.cpp +++ b/src/core/model/Project.cpp @@ -17,6 +17,8 @@ */ #include +#include +#include #include "Domain.hpp" #include "Document.hpp" @@ -33,6 +35,32 @@ 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) +{ + ParserScope scope; + ParserContext context(this, scope, logger); + return resourceManager.link(registry, context, path, mimetype, rel, + supportedTypes); +} + +Rooted Project::link(ParserContext &ctx, const std::string &path, + const std::string mimetype, const std::string rel, + RttiSet &supportedTypes) +{ + return resourceManager.link(registry, ctx, path, mimetype, rel, + supportedTypes); +} + +Rooted Project::include(ParserContext &ctx, const std::string &path, + const std::string mimetype, const std::string rel, + RttiSet &supportedTypes) +{ + return resourceManager.include(registry, ctx, path, mimetype, rel, + supportedTypes); +} + bool Project::doValidate(Logger &logger) const { return continueValidation(documents, logger); -- cgit v1.2.3