-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVisitor.h
54 lines (45 loc) · 1.11 KB
/
Visitor.h
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Honor Pledge:
//
// I pledge that I have neither given nor
// received any help on this assignment.
//
// blakbenn
#ifndef _VISITOR_H_
#define _VISITOR_H_
//Forward Declarations
class Add_Node;
class Subtract_Node;
class Multiply_Node;
class Divide_Node;
class Mod_Node;
class Integer_Node;
class Parentheses_Node;
class Closed_Parentheses_Node;
/**
* @class Visitor
*
* Crating an interface for the expression visitor
*/
class Visitor
{
public:
/// Constructor
Visitor (void);
/// Destructor
virtual ~Visitor (void)=0;
/// Visit Add Node
virtual void Visit_Add_Node(Add_Node & add_node) =0;
/// Visit Subtract Node
virtual void Visit_Subtract_Node(Subtract_Node & subtract_node) =0;
/// Visit Multiply Node
virtual void Visit_Multiply_Node(Multiply_Node & multiply_node) =0;
/// Visit Divide Node
virtual void Visit_Divide_Node(Divide_Node & divide_node) =0;
/// Visit Mod Node
virtual void Visit_Mod_Node(Mod_Node & mod_node) =0;
/// Visit Integer Node
virtual void Visit_Integer_Node(Integer_Node & integer_node) =0;
private:
/// No private members
};
#endif // !defined _VISITOR_H_