summaryrefslogtreecommitdiff
path: root/src/localscope.h
blob: e631028370a8b9ff5a33f26e2ca4078e7e408434 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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