-
Notifications
You must be signed in to change notification settings - Fork 0
/
Closed_Parentheses_Node.cpp
58 lines (50 loc) · 1.03 KB
/
Closed_Parentheses_Node.cpp
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
55
56
57
58
// Honor Pledge:
//
// I pledge that I have neither given nor
// received any help on this assignment.
//
// blakbenn
#include "Closed_Parentheses_Node.h"
#include "Eval_Expr_Tree.h"
#include <memory>
//
// Constructor
//
Closed_Parentheses_Node::Closed_Parentheses_Node (void)
{
}
//
// Destructor
//
Closed_Parentheses_Node::~Closed_Parentheses_Node (void)
{
}
// Accept method for closed parentheses necessary because of inheritance to Expr_Node, but should not actually do anything with visitation
//
// Accept
//
void Closed_Parentheses_Node::accept (Visitor & visitor)
{
//EMPTY
}
//
// Priority
//
int Closed_Parentheses_Node::Priority (void)
{
return 5;
}
//
// getParent
//
std::shared_ptr<Expr_Node> Closed_Parentheses_Node::getParent(void) //shared_ptr used for Proxy Pattern
{
return this->Parent;
}
//
// setParent
//
void Closed_Parentheses_Node::setParent(std::shared_ptr<Expr_Node> node) //shared_ptr used for Proxy Pattern
{
this->Parent = node;
}