2012-12-08 19:59:05 +00:00
|
|
|
/*
|
|
|
|
* Context.h
|
|
|
|
*
|
|
|
|
* Created on: Dec 7, 2012
|
|
|
|
* Author: attero
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CONTEXT_H_
|
|
|
|
#define CONTEXT_H_
|
|
|
|
#include <map>
|
2012-12-10 10:45:09 +00:00
|
|
|
#include <vector>
|
2012-12-08 19:59:05 +00:00
|
|
|
#include <string>
|
|
|
|
#include <iostream>
|
2012-12-30 13:59:30 +00:00
|
|
|
#include "Elements/SenchaObject.h"
|
2012-12-10 10:45:09 +00:00
|
|
|
#include "AST/ASTExpression.h"
|
2012-12-30 21:37:10 +00:00
|
|
|
#include "Context.h"
|
|
|
|
#include "Utils/to_string.h"
|
2012-12-08 19:59:05 +00:00
|
|
|
|
|
|
|
typedef unsigned long ObjectIndex;
|
|
|
|
typedef unsigned long FunctionIndex;
|
|
|
|
|
2012-12-30 13:59:30 +00:00
|
|
|
class ContextManager {
|
2012-12-08 19:59:05 +00:00
|
|
|
public:
|
2012-12-30 13:59:30 +00:00
|
|
|
ContextManager();
|
2012-12-30 21:37:10 +00:00
|
|
|
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;
|
2012-12-30 13:59:30 +00:00
|
|
|
virtual ~ContextManager();
|
2012-12-08 19:59:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* CONTEXT_H_ */
|