-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClosed_Parentheses_Node.h
71 lines (56 loc) · 1.36 KB
/
Closed_Parentheses_Node.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// Honor Pledge:
//
// I pledge that I have neither given nor
// received any help on this assignment.
//
// blakbenn
#ifndef _CLOSED_PARENTHESES_NODE_H_
#define _CLOSED_PARENTHESES_NODE_H_
#include "Expr_Node.h"
#include <memory>
/**
* @class Closed_Parentheses_Node
*
* Closed_Parentheses node
*/
class Closed_Parentheses_Node : public Expr_Node
{
public:
/// Constructor
Closed_Parentheses_Node (void);
/// Destructor
virtual ~Closed_Parentheses_Node (void);
/**
* accept
*
* traverses the tree
* @param[in] &Visitor a reference to the visitor class
*
*/
virtual void accept (Visitor & visitor);
/**
* Priority
*
*
* @return priority an integer giving the priority of the operator
*/
virtual int Priority (void);
/**
* getParent
*
* @return *Expr_Node a pointer to the parent node
*/
virtual std::shared_ptr<Expr_Node> getParent (void); //shared_ptr used for Proxy Pattern
/**
* setParent
*
* @param[in] *Expr_Node the node to be placed as the left child
*/
virtual void setParent (std::shared_ptr<Expr_Node> node); //shared_ptr used for Proxy Pattern
protected:
//parent of the expr node
std::shared_ptr<Expr_Node> Parent; //shared_ptr used for Proxy Pattern
private:
/// No private members
};
#endif // !defined _CLOSED_PARENTHESES_NODE_H_