996
|
1 // ActivationRecord.h
|
|
2
|
|
3 #ifndef ACTIVATION_RECORD_H_RAIL_1
|
|
4 #define ACTIVATION_RECORD_H_RAIL_1
|
|
5
|
|
6 #include "Vec.h"
|
|
7 #include "Board.h"
|
|
8 #include "Dir.h"
|
|
9 #include "Closure.h"
|
|
10 #include "Binding.h"
|
|
11
|
|
12 class Action;
|
|
13 class MultiLexer;
|
|
14
|
|
15 class ActivationRecord
|
|
16 {
|
|
17 public:
|
|
18 ActivationRecord();
|
|
19 ActivationRecord(Board const & source);
|
|
20 ActivationRecord(Closure const & source);
|
|
21 ~ActivationRecord();
|
|
22
|
|
23 ActivationRecord(ActivationRecord const & right);
|
|
24 ActivationRecord & operator=(ActivationRecord const & right);
|
|
25
|
|
26 void move(MultiLexer & multi);
|
|
27 Action & getAction(MultiLexer & multi, std::list<Binding> & dataStack);
|
|
28
|
|
29 std::map<std::string, Binding> const & getEnvironment(void) const;
|
|
30 void bindVariable(std::string name, Binding var);
|
|
31 Board const * getFunction(void) const;
|
|
32 Vec getPosition(void) const;
|
|
33 void setPosition(Vec newPosition);
|
|
34 Dir::t getDirection(void) const;
|
|
35 void setDirection(Dir::t newDirection);
|
|
36 private:
|
|
37 void normalMove(void);
|
|
38 private:
|
|
39 std::map<std::string, Binding> environment;
|
|
40 Board const * function;
|
|
41 Vec position;
|
|
42 Dir::t direction;
|
|
43 };
|
|
44
|
|
45 #endif
|