Hugin trunk 0.1
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Parser::ShuntingYard::Operators::OperatorBase Class Reference

base class for operator on shunting yards operator stack More...

Inheritance diagram for Parser::ShuntingYard::Operators::OperatorBase:
Inheritance graph

Public Member Functions

 OperatorBase (int prec, bool rightAssoc=false)
 
virtual ~OperatorBase ()
 
const int GetPrecedence () const
 
const bool IsRightAssociative () const
 
bool ComparePrecedence (const OperatorBase *other)
 
virtual RPNTokens::TokenBaseGetTokenBase ()
 

Private Attributes

int m_precedence
 
bool m_rightAssoc
 

Detailed Description

base class for operator on shunting yards operator stack

Definition at line 163 of file ParseExp.cpp.

Constructor & Destructor Documentation

◆ OperatorBase()

Parser::ShuntingYard::Operators::OperatorBase::OperatorBase ( int  prec,
bool  rightAssoc = false 
)
inline

Definition at line 166 of file ParseExp.cpp.

◆ ~OperatorBase()

virtual Parser::ShuntingYard::Operators::OperatorBase::~OperatorBase ( )
inlinevirtual

Definition at line 167 of file ParseExp.cpp.

Member Function Documentation

◆ ComparePrecedence()

bool Parser::ShuntingYard::Operators::OperatorBase::ComparePrecedence ( const OperatorBase other)
inline

Definition at line 170 of file ParseExp.cpp.

References GetPrecedence(), IsRightAssociative(), and threshold().

◆ GetPrecedence()

const int Parser::ShuntingYard::Operators::OperatorBase::GetPrecedence ( ) const
inline

Definition at line 168 of file ParseExp.cpp.

References m_precedence.

Referenced by ComparePrecedence().

◆ GetTokenBase()

virtual RPNTokens::TokenBase * Parser::ShuntingYard::Operators::OperatorBase::GetTokenBase ( )
inlinevirtual

◆ IsRightAssociative()

const bool Parser::ShuntingYard::Operators::OperatorBase::IsRightAssociative ( ) const
inline

Definition at line 169 of file ParseExp.cpp.

References m_rightAssoc.

Referenced by ComparePrecedence().

Member Data Documentation

◆ m_precedence

int Parser::ShuntingYard::Operators::OperatorBase::m_precedence
private

Definition at line 183 of file ParseExp.cpp.

Referenced by GetPrecedence().

◆ m_rightAssoc

bool Parser::ShuntingYard::Operators::OperatorBase::m_rightAssoc
private

Definition at line 184 of file ParseExp.cpp.

Referenced by IsRightAssociative().


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