Code::Blocks  SVN r11506
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
ExpressionNode Class Reference

#include <expression.h>

Collaboration diagram for ExpressionNode:

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
 

Detailed Description

Definition at line 12 of file expression.h.

Member Enumeration Documentation

◆ ExpressionNodeType

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.

Constructor & Destructor Documentation

◆ ExpressionNode()

ExpressionNode::ExpressionNode ( )

Definition at line 88 of file expression.cpp.

References wxEmptyString.

Member Function Documentation

◆ GetNodeTypePriority()

long ExpressionNode::GetNodeTypePriority ( ExpressionNodeType  type)
static

◆ GetPriority()

long ExpressionNode::GetPriority ( ) const
inline

Definition at line 50 of file expression.h.

References m_Priority.

Referenced by Expression::ConvertInfixToPostfix().

◆ GetToken()

wxString ExpressionNode::GetToken ( ) const
inline

Definition at line 51 of file expression.h.

References m_Token.

◆ GetTokenValue()

long ExpressionNode::GetTokenValue ( ) const
inline

◆ GetType()

ExpressionNodeType ExpressionNode::GetType ( ) const
inline

Definition at line 45 of file expression.h.

References m_Type.

Referenced by Expression::CalcPostfix(), and Expression::ConvertInfixToPostfix().

◆ Initialize()

void ExpressionNode::Initialize ( wxString  token)

Definition at line 93 of file expression.cpp.

Referenced by Expression::ConvertInfixToPostfix().

◆ IsBinaryOperator()

bool ExpressionNode::IsBinaryOperator ( wxString  first,
wxString  second 
)
static

◆ IsUnaryNode()

bool ExpressionNode::IsUnaryNode ( ExpressionNodeType  type)
static

◆ IsUnaryOperator()

bool ExpressionNode::IsUnaryOperator ( ) const
inline

Definition at line 47 of file expression.h.

References m_UnaryOperator.

Referenced by Expression::CalcPostfix().

◆ ParseNodeType()

ExpressionNode::ExpressionNodeType ExpressionNode::ParseNodeType ( wxString  token)
static

◆ SetUnaryOperator()

void ExpressionNode::SetUnaryOperator ( bool  unary = true)
inline

Definition at line 48 of file expression.h.

References m_UnaryOperator.

Referenced by Expression::ConvertInfixToPostfix().

Member Data Documentation

◆ m_Priority

long ExpressionNode::m_Priority
private

Definition at line 71 of file expression.h.

Referenced by GetPriority().

◆ m_Token

wxString ExpressionNode::m_Token
private

Definition at line 68 of file expression.h.

Referenced by GetToken(), and GetTokenValue().

◆ m_Type

ExpressionNodeType ExpressionNode::m_Type
private

Definition at line 69 of file expression.h.

Referenced by GetType().

◆ m_UnaryOperator

bool ExpressionNode::m_UnaryOperator
private

Definition at line 70 of file expression.h.

Referenced by IsUnaryOperator(), and SetUnaryOperator().


The documentation for this class was generated from the following files: