2012-12-17 09:41:48 +00:00
|
|
|
/*
|
|
|
|
* VariableExpression.h
|
|
|
|
*
|
|
|
|
* Created on: Dec 17, 2012
|
|
|
|
* Author: att
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef VARIABLEEXPRESSION_H_
|
|
|
|
#define VARIABLEEXPRESSION_H_
|
|
|
|
#include <iostream>
|
|
|
|
#include <string>
|
2012-12-30 13:59:30 +00:00
|
|
|
#include "../ContextManager.h"
|
2012-12-17 09:41:48 +00:00
|
|
|
#include "ASTExpression.h"
|
|
|
|
|
2012-12-28 10:41:43 +00:00
|
|
|
/**
|
|
|
|
* VariableExpression is actually a wrapper around name and appropriate context
|
|
|
|
* variable can evaluate itself in right time. It's an abstraction of variable.
|
|
|
|
*/
|
2012-12-17 09:41:48 +00:00
|
|
|
class VariableExpression: public ASTExpression {
|
|
|
|
public:
|
|
|
|
VariableExpression();
|
2012-12-30 13:59:30 +00:00
|
|
|
VariableExpression(std::string name, ContextManager * context);
|
2012-12-17 09:41:48 +00:00
|
|
|
|
2012-12-31 16:10:37 +00:00
|
|
|
ContextManager * context_manager;
|
2012-12-17 09:41:48 +00:00
|
|
|
std::string name;
|
2012-12-31 16:10:37 +00:00
|
|
|
std::string name_of_context;
|
|
|
|
SenchaObject execute();
|
2012-12-17 09:41:48 +00:00
|
|
|
SenchaObject evaluate();
|
|
|
|
virtual ~VariableExpression();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* VARIABLEEXPRESSION_H_ */
|