summaryrefslogtreecommitdiff
path: root/src/localscope.h
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2013-04-19 21:52:01 (GMT)
committerMarius Kintel <marius@kintel.net>2013-04-26 21:45:03 (GMT)
commit9a297ecee57549a4eb3919bde4f7b41a548724de (patch)
treeb1f523e93f528559e9ada2d38d76be7a0362f9d4 /src/localscope.h
parentb4568a09df8be0f212ba1c4fd1660459900e3cf0 (diff)
Refactoring: Split out FileModule from Module, Added LocalScope renamed some confusing 'evaluate' methods to 'instantiate', added FileContext (not yet used)
Diffstat (limited to 'src/localscope.h')
-rw-r--r--src/localscope.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/localscope.h b/src/localscope.h
new file mode 100644
index 0000000..e631028
--- /dev/null
+++ b/src/localscope.h
@@ -0,0 +1,25 @@
+#ifndef LOCALSCOPE_H_
+#define LOCALSCOPE_H_
+
+#include "typedefs.h"
+#include <boost/unordered_map.hpp>
+
+class LocalScope
+{
+public:
+ LocalScope();
+ ~LocalScope();
+
+ size_t numElements() const { return assignments.size() + children.size(); }
+ std::string dump(const std::string &indent) const;
+ std::vector<class AbstractNode*> instantiateChildren(const class Context *evalctx) const;
+
+ AssignmentList assignments;
+ ModuleInstantiationList children;
+ typedef boost::unordered_map<std::string, class AbstractFunction*> FunctionContainer;
+ FunctionContainer functions;
+ typedef boost::unordered_map<std::string, class AbstractModule*> AbstractModuleContainer;
+ AbstractModuleContainer modules;
+};
+
+#endif
contact: Jan Huwald // Impressum