summaryrefslogtreecommitdiff
path: root/src/localscope.h
blob: d81a27c7edb4bb9bf455eebd182c05f4b8ce8f1e (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
26
#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, class FileContext *filectx = NULL) const;
	void addChild(ModuleInstantiation *ch);

	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