summaryrefslogtreecommitdiff
path: root/src/core/model/Project.cpp
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-01-27 01:39:19 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-01-27 01:39:19 +0100
commit84f0004cdf45f6fbad6461676897aa27f03cbb93 (patch)
treeacb15536b40d7389c3c65df1567084bb57da416e /src/core/model/Project.cpp
parent495e2de57e587450e9532c7fe4ae0c2bfb196e6c (diff)
Removed dependency between "Project" model class and parser/resources. This reduces coupling and was stupid beforehand.
Diffstat (limited to 'src/core/model/Project.cpp')
-rw-r--r--src/core/model/Project.cpp42
1 files changed, 5 insertions, 37 deletions
diff --git a/src/core/model/Project.cpp b/src/core/model/Project.cpp
index 2833b37..b355969 100644
--- a/src/core/model/Project.cpp
+++ b/src/core/model/Project.cpp
@@ -17,8 +17,6 @@
*/
#include <core/common/RttiBuilder.hpp>
-#include <core/parser/ParserScope.hpp>
-#include <core/parser/ParserContext.hpp>
#include "Domain.hpp"
#include "Document.hpp"
@@ -27,52 +25,22 @@
namespace ousia {
-Project::Project(Manager &mgr, Registry &registry)
+Project::Project(Manager &mgr)
: Node(mgr),
- registry(registry),
systemTypesystem(acquire(new SystemTypesystem(mgr))),
documents(this)
{
}
-Rooted<Node> Project::parse(const std::string &path, const std::string mimetype,
- const std::string rel,
- const RttiSet &supportedTypes, Logger &logger)
-{
- ParserScope scope;
- ParserContext context(this, scope, logger);
- return resourceManager.link(registry, context, path, mimetype, rel,
- supportedTypes);
-}
-
-Rooted<Node> Project::link(ParserContext &ctx, const std::string &path,
- const std::string mimetype, const std::string rel,
- const RttiSet &supportedTypes)
-{
- return resourceManager.link(registry, ctx, path, mimetype, rel,
- supportedTypes);
-}
-
-Rooted<Node> Project::include(ParserContext &ctx, const std::string &path,
- const std::string mimetype, const std::string rel,
- 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);
}
+void Project::doResolve(ResolutionState &state){
+ continueResolveComposita(documents, documents.getIndex(), state);
+}
+
Rooted<SystemTypesystem> Project::getSystemTypesystem()
{
return systemTypesystem;