-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFactor.h
42 lines (25 loc) · 781 Bytes
/
Factor.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
#ifndef EXPRESSION_CALCULATOR_FACTOR_H
#define EXPRESSION_CALCULATOR_FACTOR_H
#include "Variable.h"
class LeftParenthesis;
class RightParenthesis;
class Expression;
class Number;
class Factor : public Variable
{
public:
Factor (void);
virtual ~Factor (void);
virtual int evaluate (void);
virtual void accept (SymbolVisitor & visitor);
void setLeftParenthesis (LeftParenthesis * leftParenthesis);
void setExpression (Expression * expression);
void setRightParenthesis (RightParenthesis * rightParenthesis);
void setNumber (Number * number);
protected:
LeftParenthesis * leftParenthesis_;
Expression * expression_;
RightParenthesis * rightParenthesis_;
Number * number_;
};
#endif //EXPRESSION_CALCULATOR_FACTOR_H