Code::Blocks
SVN r11506
|
#include <expression.h>
Public Types | |
enum | ExpressionNodeType { Unknown, Plus, Subtract, Multiply, Divide, LParenthesis, RParenthesis, Mod, Power, BitwiseAnd, BitwiseOr, And, Or, Not, Equal, Unequal, GT, LT, GTOrEqual, LTOrEqual, LShift, RShift, Numeric } |
Public Member Functions | |
ExpressionNode () | |
void | Initialize (wxString token) |
ExpressionNodeType | GetType () const |
bool | IsUnaryOperator () const |
void | SetUnaryOperator (bool unary=true) |
long | GetPriority () const |
wxString | GetToken () const |
long | GetTokenValue () const |
Static Public Member Functions | |
static ExpressionNodeType | ParseNodeType (wxString token) |
static long | GetNodeTypePriority (ExpressionNodeType type) |
static bool | IsUnaryNode (ExpressionNodeType type) |
static bool | IsBinaryOperator (wxString first, wxString second) |
Private Attributes | |
wxString | m_Token |
ExpressionNodeType | m_Type |
bool | m_UnaryOperator |
long | m_Priority |
Definition at line 12 of file expression.h.
Enumerator | |
---|---|
Unknown | |
Plus | |
Subtract | |
Multiply | |
Divide | |
LParenthesis | |
RParenthesis | |
Mod | |
Power | |
BitwiseAnd | |
BitwiseOr | |
And | |
Or | |
Not | |
Equal | |
Unequal | |
GT | |
LT | |
GTOrEqual | |
LTOrEqual | |
LShift | |
RShift | |
Numeric |
Definition at line 15 of file expression.h.
ExpressionNode::ExpressionNode | ( | ) |
Definition at line 88 of file expression.cpp.
References wxEmptyString.
|
static |
Definition at line 132 of file expression.cpp.
References ExpressionConsts::And, ExpressionConsts::BitwiseAnd, ExpressionConsts::BitwiseOr, ExpressionConsts::Divide, ExpressionConsts::Equal, ExpressionConsts::GT, ExpressionConsts::GTOrEqual, ExpressionConsts::LParenthesis(), ExpressionConsts::LShift, ExpressionConsts::LT, ExpressionConsts::LTOrEqual, ExpressionConsts::Mod, ExpressionConsts::Multiply, ExpressionConsts::Not, ExpressionConsts::Or, ExpressionConsts::Plus, ExpressionConsts::Power, ExpressionConsts::RParenthesis, ExpressionConsts::RShift, ExpressionConsts::Subtract, and ExpressionConsts::Unequal.
Referenced by GetTokenValue().
|
inline |
Definition at line 50 of file expression.h.
References m_Priority.
Referenced by Expression::ConvertInfixToPostfix().
|
inline |
Definition at line 51 of file expression.h.
References m_Token.
|
inline |
Definition at line 52 of file expression.h.
References GetNodeTypePriority(), IsBinaryOperator(), IsUnaryNode(), m_Token, ParseNodeType(), and wxString::ToLong().
Referenced by Expression::CalcPostfix().
|
inline |
Definition at line 45 of file expression.h.
References m_Type.
Referenced by Expression::CalcPostfix(), and Expression::ConvertInfixToPostfix().
void ExpressionNode::Initialize | ( | wxString | token | ) |
Definition at line 93 of file expression.cpp.
Referenced by Expression::ConvertInfixToPostfix().
Definition at line 197 of file expression.cpp.
References _T, ExpressionConsts::And, ExpressionConsts::Equal, wxString::GetChar(), ExpressionConsts::GTOrEqual, ExpressionConsts::LShift, ExpressionConsts::LTOrEqual, ExpressionConsts::Or, ExpressionConsts::RShift, and ExpressionConsts::Unequal.
Referenced by Expression::AddToInfixExpression(), and GetTokenValue().
|
static |
Definition at line 163 of file expression.cpp.
References And, BitwiseAnd, BitwiseOr, Divide, Equal, GT, GTOrEqual, LParenthesis, LShift, LT, LTOrEqual, Mod, Multiply, Not, Numeric, Or, Plus, Power, RParenthesis, RShift, Subtract, Unequal, and Unknown.
Referenced by Expression::ConvertInfixToPostfix(), and GetTokenValue().
|
inline |
Definition at line 47 of file expression.h.
References m_UnaryOperator.
Referenced by Expression::CalcPostfix().
|
static |
Definition at line 101 of file expression.cpp.
References And, ExpressionConsts::And, BitwiseAnd, ExpressionConsts::BitwiseAnd, BitwiseOr, ExpressionConsts::BitwiseOr, Divide, ExpressionConsts::Divide, Equal, ExpressionConsts::Equal, GT, ExpressionConsts::GT, GTOrEqual, ExpressionConsts::GTOrEqual, wxString::IsEmpty(), LParenthesis, ExpressionConsts::LParenthesis(), LShift, ExpressionConsts::LShift, LT, ExpressionConsts::LT, LTOrEqual, ExpressionConsts::LTOrEqual, Mod, ExpressionConsts::Mod, Multiply, ExpressionConsts::Multiply, Not, ExpressionConsts::Not, Numeric, Or, ExpressionConsts::Or, Plus, ExpressionConsts::Plus, Power, ExpressionConsts::Power, RParenthesis, ExpressionConsts::RParenthesis, RShift, ExpressionConsts::RShift, Subtract, ExpressionConsts::Subtract, Unequal, ExpressionConsts::Unequal, Unknown, and wxIsdigit().
Referenced by GetTokenValue().
|
inline |
Definition at line 48 of file expression.h.
References m_UnaryOperator.
Referenced by Expression::ConvertInfixToPostfix().
|
private |
Definition at line 71 of file expression.h.
Referenced by GetPriority().
|
private |
Definition at line 68 of file expression.h.
Referenced by GetToken(), and GetTokenValue().
|
private |
Definition at line 69 of file expression.h.
Referenced by GetType().
|
private |
Definition at line 70 of file expression.h.
Referenced by IsUnaryOperator(), and SetUnaryOperator().