diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-18 21:42:49 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-18 21:42:49 +0100 |
commit | 2eec59a47ec36e5e4f921ca91284942b4d7d521b (patch) | |
tree | 8847623e9b9b1571150142c236b5ab2d8413ce77 /src/core/parser | |
parent | 677d6830a0252e7478c2f5d6f75cfb845d33ad23 (diff) |
Fixed bugs in definition of Project, added reference to Project to ParserContext
Diffstat (limited to 'src/core/parser')
-rw-r--r-- | src/core/parser/Parser.hpp | 17 | ||||
-rw-r--r-- | src/core/parser/ParserStack.hpp | 2 |
2 files changed, 16 insertions, 3 deletions
diff --git a/src/core/parser/Parser.hpp b/src/core/parser/Parser.hpp index 63c57c3..049ee4e 100644 --- a/src/core/parser/Parser.hpp +++ b/src/core/parser/Parser.hpp @@ -37,6 +37,7 @@ #include <core/common/Exceptions.hpp> #include <core/common/Logger.hpp> #include <core/model/Node.hpp> +#include <core/model/Project.hpp> #include "Scope.hpp" @@ -70,6 +71,11 @@ struct ParserContext { Manager &manager; /** + * Project instance into which the new content should be parsed. + */ + Rooted<model::Project> project; + + /** * Constructor of the ParserContext class. * * @param scope is a reference to the Scope instance that should be used to @@ -80,11 +86,16 @@ struct ParserContext { * @param logger is a reference to the Logger instance that should be used * to log error messages and warnings that occur while parsing the document. * @param manager is a Reference to the Manager the parser should append - *nodes to. + * nodes to. + * @param project is the project into which the content should be parsed. */ ParserContext(Scope &scope, Registry ®istry, Logger &logger, - Manager &manager) - : scope(scope), registry(registry), logger(logger), manager(manager){}; + Manager &manager, Handle<model::Project> project) + : scope(scope), + registry(registry), + logger(logger), + manager(manager), + project(project){}; }; /** diff --git a/src/core/parser/ParserStack.hpp b/src/core/parser/ParserStack.hpp index aa196e7..492ab9c 100644 --- a/src/core/parser/ParserStack.hpp +++ b/src/core/parser/ParserStack.hpp @@ -147,6 +147,8 @@ public: Logger &logger() { return handlerData.ctx.logger; } + Rooted<model::Project> project() { return handlerData.ctx.project; } + State state() { return handlerData.state; } State parentState() { return handlerData.parentState; } |