summaryrefslogtreecommitdiff
path: root/src/core/parser/ParserStack.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/parser/ParserStack.hpp')
-rw-r--r--src/core/parser/ParserStack.hpp27
1 files changed, 6 insertions, 21 deletions
diff --git a/src/core/parser/ParserStack.hpp b/src/core/parser/ParserStack.hpp
index 6296dff..031ce68 100644
--- a/src/core/parser/ParserStack.hpp
+++ b/src/core/parser/ParserStack.hpp
@@ -139,15 +139,13 @@ public:
const std::string &name() { return handlerData.name; }
- ParserScope &scope() { return handlerData.ctx.scope; }
+ ParserScope &scope() { return handlerData.ctx.getScope(); }
- Registry &registry() { return handlerData.ctx.registry; }
+ Manager &manager() { return handlerData.ctx.getManager(); }
- Manager &manager() { return handlerData.ctx.manager; }
+ Logger &logger() { return handlerData.ctx.getLogger(); }
- Logger &logger() { return handlerData.ctx.logger; }
-
- Rooted<model::Project> project() { return handlerData.ctx.project; }
+ Rooted<Project> project() { return handlerData.ctx.getProject(); }
State state() { return handlerData.state; }
@@ -322,11 +320,6 @@ private:
std::stack<HandlerInstance> stack;
/**
- * Reference at some user defined data.
- */
- void *userData;
-
- /**
* Used internally to get all expected command names for the given state
* (does not work if the current Handler instance allows arbitrary
* children). This function is used to build error messages.
@@ -345,9 +338,8 @@ public:
* corresponding HandlerDescriptor instances.
*/
ParserStack(ParserContext &ctx,
- const std::multimap<std::string, HandlerDescriptor> &handlers,
- void *userData = nullptr)
- : ctx(ctx), handlers(handlers), userData(userData){};
+ const std::multimap<std::string, HandlerDescriptor> &handlers)
+ : ctx(ctx), handlers(handlers){};
/**
* Returns the state the ParserStack instance currently is in.
@@ -425,13 +417,6 @@ public:
* @return a reference to the parser context.
*/
ParserContext &getContext() { return ctx; }
-
- /**
- * Returns the user defined data.
- *
- * @return the userData pointer that was given in the constructor.
- */
- void *getUserData() { return userData; }
};
}