summaryrefslogtreecommitdiffstats
path: root/Sencha-lang/ContextManager.h
blob: f376da5829b3be8e09713b2e188382457451eac8 (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
27
28
29
30
31
32
33
34
/*
 * Context.h
 *
 *  Created on: Dec 7, 2012
 *      Author: attero
 */

#ifndef CONTEXT_H_
#define CONTEXT_H_
#include <map>
#include <vector>
#include <string>
#include <iostream>
#include "Elements/SenchaObject.h"
#include "AST/ASTExpression.h"
#include "Context.h"
#include "Utils/to_string.h"

typedef unsigned long ObjectIndex;
typedef unsigned long FunctionIndex;

class ContextManager {
public:
	ContextManager();
	std::map<std::string, Context *> contexts;
	Context * create_new_context();
	void destroy_context(std::string name);
	Context * get_context(std::string name);
	Context * context(std::string name);
	unsigned int index;
	virtual ~ContextManager();
};

#endif /* CONTEXT_H_ */