summaryrefslogtreecommitdiff
path: root/src/evalcontext.h
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2013-04-09 04:28:16 (GMT)
committerMarius Kintel <marius@kintel.net>2013-04-09 04:28:16 (GMT)
commita37813a8999571f4b9235f33fdc7c22bcbe5fd17 (patch)
tree266d8c106100edab9f51b93cf229cf55cd083918 /src/evalcontext.h
parentb16c24fb2888d932ec035fff27cb29b4ffbc256b (diff)
Refactored context handling into using separate Module contexts and Eval contexts. This allows for recursive module calls, and cascading children. I believe this fixes issue #116
Diffstat (limited to 'src/evalcontext.h')
-rw-r--r--src/evalcontext.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/evalcontext.h b/src/evalcontext.h
new file mode 100644
index 0000000..3d7d222
--- /dev/null
+++ b/src/evalcontext.h
@@ -0,0 +1,24 @@
+#ifndef EVALCONTEXT_H_
+#define EVALCONTEXT_H_
+
+#include "context.h"
+
+/*!
+ This hold the evaluation context (the parameters actually sent
+ when calling a module or function, including the children).
+*/
+class EvalContext : public Context
+{
+public:
+ EvalContext(const Context *parent = NULL) : Context(parent) {}
+ virtual ~EvalContext() {}
+
+ std::vector<std::pair<std::string, Value> > eval_arguments;
+ std::vector<class ModuleInstantiation *> children;
+
+#ifdef DEBUG
+ virtual void dump(const class AbstractModule *mod, const ModuleInstantiation *inst);
+#endif
+};
+
+#endif
contact: Jan Huwald // Impressum