LibreOffice Module basic (master) 1
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
SbiExpression Class Reference

#include <expr.hxx>

Inheritance diagram for SbiExpression:
[legend]
Collaboration diagram for SbiExpression:
[legend]

Public Member Functions

 SbiExpression (SbiParser *, SbiExprType=SbSTDEXPR, SbiExprMode eMode=EXPRMODE_STANDARD, const KeywordSymbolInfo *pKeywordSymbolInfo=nullptr)
 
 SbiExpression (SbiParser *, double, SbxDataType)
 
 SbiExpression (SbiParser *, const SbiSymDef &, SbiExprListPtr=nullptr)
 
 ~SbiExpression ()
 
OUString & GetName ()
 
void SetBased ()
 
bool IsBased () const
 
void SetByVal ()
 
bool IsBracket () const
 
bool IsValid () const
 
bool IsVariable () const
 
bool IsLvalue () const
 
void ConvertToIntConstIfPossible ()
 
const OUString & GetString () const
 
SbiSymDefGetRealVar ()
 
SbiExprNodeGetExprNode ()
 
SbxDataType GetType () const
 
void Gen (RecursiveMode eRecMode=UNDEFINED)
 

Protected Member Functions

std::unique_ptr< SbiExprNodeTerm (const KeywordSymbolInfo *pKeywordSymbolInfo=nullptr)
 
std::unique_ptr< SbiExprNodeObjTerm (SbiSymDef &)
 
std::unique_ptr< SbiExprNodeOperand (bool bUsedForTypeOf=false)
 
std::unique_ptr< SbiExprNodeUnary ()
 
std::unique_ptr< SbiExprNodeExp ()
 
std::unique_ptr< SbiExprNodeMulDiv ()
 
std::unique_ptr< SbiExprNodeIntDiv ()
 
std::unique_ptr< SbiExprNodeMod ()
 
std::unique_ptr< SbiExprNodeAddSub ()
 
std::unique_ptr< SbiExprNodeCat ()
 
std::unique_ptr< SbiExprNodeLike ()
 
std::unique_ptr< SbiExprNodeVBA_Not ()
 
std::unique_ptr< SbiExprNodeComp ()
 
std::unique_ptr< SbiExprNodeBoolean ()
 

Protected Attributes

OUString aArgName
 
SbiParserpParser
 
std::unique_ptr< SbiExprNodepExpr
 
SbiExprType eCurExpr
 
SbiExprMode m_eMode
 
bool bBased = false
 
bool bError = false
 
bool bByVal = false
 
bool bBracket = false
 
sal_uInt16 nParenLevel = 0
 

Friends

class SbiExprList
 

Detailed Description

Definition at line 166 of file expr.hxx.

Constructor & Destructor Documentation

◆ SbiExpression() [1/3]

SbiExpression::SbiExpression ( SbiParser p,
SbiExprType  t = SbSTDEXPR,
SbiExprMode  eMode = EXPRMODE_STANDARD,
const KeywordSymbolInfo pKeywordSymbolInfo = nullptr 
)

◆ SbiExpression() [2/3]

SbiExpression::SbiExpression ( SbiParser p,
double  n,
SbxDataType  t 
)

Definition at line 49 of file exprtree.cxx.

References n, p, pExpr, pParser, and t.

◆ SbiExpression() [3/3]

SbiExpression::SbiExpression ( SbiParser p,
const SbiSymDef r,
SbiExprListPtr  pPar = nullptr 
)

Definition at line 58 of file exprtree.cxx.

References p, pExpr, and SbxVARIANT.

◆ ~SbiExpression()

SbiExpression::~SbiExpression ( )

Definition at line 66 of file exprtree.cxx.

Member Function Documentation

◆ AddSub()

std::unique_ptr< SbiExprNode > SbiExpression::AddSub ( )
protected

Definition at line 679 of file exprtree.cxx.

References EXPRMODE_EMPTY_PAREN, m_eMode, MINUS, Mod(), SbiTokenizer::Next(), SbiTokenizer::Peek(), PLUS, and pParser.

Referenced by Cat().

◆ Boolean()

std::unique_ptr< SbiExprNode > SbiExpression::Boolean ( )
protected

Definition at line 781 of file exprtree.cxx.

References AND, EQV, EXPRMODE_EMPTY_PAREN, IMP, IS, Like(), m_eMode, SbiTokenizer::Next(), OR, SbiTokenizer::Peek(), pParser, and XOR.

Referenced by Operand(), and SbiExpression().

◆ Cat()

std::unique_ptr< SbiExprNode > SbiExpression::Cat ( )
protected

Definition at line 698 of file exprtree.cxx.

References AddSub(), CAT, EXPRMODE_EMPTY_PAREN, m_eMode, SbiTokenizer::Next(), SbiTokenizer::Peek(), and pParser.

Referenced by Comp().

◆ Comp()

std::unique_ptr< SbiExprNode > SbiExpression::Comp ( )
protected

◆ ConvertToIntConstIfPossible()

void SbiExpression::ConvertToIntConstIfPossible ( )
inline

Definition at line 207 of file expr.hxx.

References pExpr.

◆ Exp()

std::unique_ptr< SbiExprNode > SbiExpression::Exp ( )
protected

Definition at line 618 of file exprtree.cxx.

References EXPON, EXPRMODE_EMPTY_PAREN, m_eMode, SbiTokenizer::Next(), SbiTokenizer::Peek(), pParser, and Unary().

Referenced by MulDiv().

◆ Gen()

void SbiExpression::Gen ( RecursiveMode  eRecMode = UNDEFINED)

◆ GetExprNode()

SbiExprNode * SbiExpression::GetExprNode ( )
inline

Definition at line 210 of file expr.hxx.

References pExpr.

Referenced by SbiParser::Symbol(), and SbiParser::With().

◆ GetName()

OUString & SbiExpression::GetName ( )
inline

Definition at line 199 of file expr.hxx.

References aArgName.

◆ GetRealVar()

SbiSymDef * SbiExpression::GetRealVar ( )
inline

◆ GetString()

const OUString & SbiExpression::GetString ( ) const
inline

Definition at line 208 of file expr.hxx.

References pExpr.

◆ GetType()

SbxDataType SbiExpression::GetType ( ) const
inline

Definition at line 211 of file expr.hxx.

References pExpr.

Referenced by SbiParser::LSet(), SbiParser::RSet(), and SbiParser::Set().

◆ IntDiv()

std::unique_ptr< SbiExprNode > SbiExpression::IntDiv ( )
protected

Definition at line 651 of file exprtree.cxx.

References EXPRMODE_EMPTY_PAREN, IDIV, m_eMode, MulDiv(), SbiTokenizer::Next(), SbiTokenizer::Peek(), and pParser.

Referenced by Mod().

◆ IsBased()

bool SbiExpression::IsBased ( ) const
inline

Definition at line 201 of file expr.hxx.

References bBased.

◆ IsBracket()

bool SbiExpression::IsBracket ( ) const
inline

Definition at line 203 of file expr.hxx.

References bBracket.

Referenced by SbiParser::Symbol().

◆ IsLvalue()

bool SbiExpression::IsLvalue ( ) const
inline

Definition at line 206 of file expr.hxx.

References pExpr.

Referenced by SbiParser::Symbol().

◆ IsValid()

bool SbiExpression::IsValid ( ) const
inline

Definition at line 204 of file expr.hxx.

References pExpr.

Referenced by SbiParser::DefEnum(), and SbiParser::DefVar().

◆ IsVariable()

bool SbiExpression::IsVariable ( ) const
inline

Definition at line 205 of file expr.hxx.

References pExpr.

Referenced by SbiExpression().

◆ Like()

std::unique_ptr< SbiExprNode > SbiExpression::Like ( )
protected

◆ Mod()

std::unique_ptr< SbiExprNode > SbiExpression::Mod ( )
protected

Definition at line 665 of file exprtree.cxx.

References EXPRMODE_EMPTY_PAREN, IntDiv(), m_eMode, MOD, SbiTokenizer::Next(), SbiTokenizer::Peek(), and pParser.

Referenced by AddSub().

◆ MulDiv()

std::unique_ptr< SbiExprNode > SbiExpression::MulDiv ( )
protected

Definition at line 632 of file exprtree.cxx.

References DIV, Exp(), EXPRMODE_EMPTY_PAREN, m_eMode, MUL, SbiTokenizer::Next(), SbiTokenizer::Peek(), and pParser.

Referenced by IntDiv().

◆ ObjTerm()

std::unique_ptr< SbiExprNode > SbiExpression::ObjTerm ( SbiSymDef rObj)
protected

◆ Operand()

std::unique_ptr< SbiExprNode > SbiExpression::Operand ( bool  bUsedForTypeOf = false)
protected

◆ SetBased()

void SbiExpression::SetBased ( )
inline

Definition at line 200 of file expr.hxx.

References bBased.

◆ SetByVal()

void SbiExpression::SetByVal ( )
inline

Definition at line 202 of file expr.hxx.

References bByVal.

◆ Term()

std::unique_ptr< SbiExprNode > SbiExpression::Term ( const KeywordSymbolInfo pKeywordSymbolInfo = nullptr)
protected

◆ Unary()

std::unique_ptr< SbiExprNode > SbiExpression::Unary ( )
protected

◆ VBA_Not()

std::unique_ptr< SbiExprNode > SbiExpression::VBA_Not ( )
protected

Definition at line 742 of file exprtree.cxx.

References Comp(), SbiTokenizer::Next(), NOT, SbiTokenizer::Peek(), pParser, and VBA_Not().

Referenced by Like(), Operand(), and VBA_Not().

Friends And Related Function Documentation

◆ SbiExprList

friend class SbiExprList
friend

Definition at line 167 of file expr.hxx.

Member Data Documentation

◆ aArgName

OUString SbiExpression::aArgName
protected

Definition at line 169 of file expr.hxx.

Referenced by GetName().

◆ bBased

bool SbiExpression::bBased = false
protected

Definition at line 174 of file expr.hxx.

Referenced by Gen(), IsBased(), and SetBased().

◆ bBracket

bool SbiExpression::bBracket = false
protected

Definition at line 177 of file expr.hxx.

Referenced by IsBracket(), and Term().

◆ bByVal

bool SbiExpression::bByVal = false
protected

Definition at line 176 of file expr.hxx.

Referenced by Gen(), and SetByVal().

◆ bError

bool SbiExpression::bError = false
protected

Definition at line 175 of file expr.hxx.

Referenced by Like(), ObjTerm(), and Term().

◆ eCurExpr

SbiExprType SbiExpression::eCurExpr
protected

Definition at line 172 of file expr.hxx.

Referenced by ObjTerm(), and Term().

◆ m_eMode

SbiExprMode SbiExpression::m_eMode
protected

Definition at line 173 of file expr.hxx.

Referenced by AddSub(), Boolean(), Cat(), Comp(), Exp(), IntDiv(), Like(), Mod(), MulDiv(), Operand(), and Term().

◆ nParenLevel

sal_uInt16 SbiExpression::nParenLevel = 0
protected

Definition at line 178 of file expr.hxx.

Referenced by Operand().

◆ pExpr

std::unique_ptr<SbiExprNode> SbiExpression::pExpr
protected

◆ pParser

SbiParser* SbiExpression::pParser
protected

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