xbExpn Class Reference

xbExpn class More...

#include <xbexp.h>

List of all members.

Public Member Functions

 xbExpn (xbXBase *)
 xbExpn Constructor
virtual ~xbExpn ()
 xbExpn Destructor
xbShort GetNextToken (const char *s, xbShort MaxLen)
 GetNextToken.
xbShort ProcessExpression (xbExpNode *n, xbShort)
 Short description.
xbShort ProcessExpression (xbShort opt)
xbExpNodeGetTree ()
void SetTreeToNull ()
xbExpNodeGetFirstTreeNode (xbExpNode *)
 Short description.
xbExpNodeGetFirstTreeNode ()
xbShort ProcessExpression (const char *exp, xbDbf *d)
 ProcessExpression.
xbShort ParseExpression (const char *exp, xbDbf *d)
 ParseExpression.
xbExpNodeGetExpressionHandle ()
 GetExpressionHandle.
char GetExpressionResultType (xbExpNode *)
 GetExpressionResultType.
char GetExpressionResultType ()
char * GetCharResult ()
xbStringGetStringResult ()
 Short description.
xbDouble GetDoubleResult ()
 Short description.
xbLong GetIntResult ()
 Short description.
xbShort ProcessExpression (xbExpNode *)
 Short description.
xbShort ProcessExpression ()
xbShort BuildExpressionTree (const char *Expression, xbShort MaxTokenLen, xbDbf *d)
 BuildExpressionTree.
void InitStack ()
 Destructor.
xbExpNodePop ()
 Pop the top value from the stack.
xbShort Push (xbExpNode *)
 Push a value onto the stack.
xbShort GetStackDepth ()
void DumpStack ()
 Short description.
const char * GetValidFuncName (xbShort funcNo)
void DumpExpressionTree (xbShort printOption)
void DumpExpressionTree (xbExpNode *, xbShort printOption)
 DumpExpressionTree.
void DumpExpNode (xbExpNode *, xbShort printOption)
 DumpExpNode.
xbDouble ABS (xbDouble)
 Short description.
xbLong ASC (const char *)
 Short description.
xbLong AT (const char *, const char *)
 Short description.
char * CDOW (const char *)
 Short description.
char * CHR (xbLong)
 Short description.
char * CMONTH (const char *)
 Short description.
char * CTOD (const char *)
 Short description.
char * DATE ()
 Short description.
xbLong DAY (const char *)
 Short description.
char * DESCEND (const char *)
 Short description.
xbLong DESCEND (const xbDate &)
 Short description.
xbDouble DESCEND (xbDouble)
 Short description.
xbLong DOW (const char *)
 Short description.
char * DTOC (const char *)
 Short description.
char * DTOS (const char *)
 Short description.
xbDouble EXP (xbDouble)
 Short description.
char * IIF (xbShort, const char *, const char *)
 Short description.
xbLong INT (xbDouble)
 Short description.
xbLong ISALPHA (const char *)
 Short description.
xbLong ISLOWER (const char *)
 Short description.
xbLong ISUPPER (const char *)
 Short description.
char * LEFT (const char *, xbShort)
 Short description.
xbLong LEN (const char *)
 Short description.
xbDouble LOG (xbDouble)
 Short description.
char * LOWER (const char *)
 Short description.
char * LTRIM (const char *)
 Short description.
xbDouble MAX (xbDouble, xbDouble)
 Short description.
xbLong MONTH (const char *)
 Short description.
xbDouble MIN (xbDouble, xbDouble)
 Short description.
xbLong RECNO (xbDbf *)
 Short description.
char * REPLICATE (const char *, xbShort)
 Short description.
char * RIGHT (const char *, xbShort)
 Short description.
char * RTRIM (const char *)
 Short description.
char * SPACE (xbShort)
 Short description.
xbDouble SQRT (xbDouble)
 Short description.
char * STR (const char *)
 Short description.
char * STR (const char *, xbShort)
 Short description.
char * STR (const char *, xbShort, xbShort)
 Short description.
char * STR (xbDouble)
 Short description.
char * STR (xbDouble, xbShort)
 Short description.
char * STR (xbDouble, xbUShort length, xbShort numDecimals)
 Short description.
char * STRZERO (const char *)
 Short description.
char * STRZERO (const char *, xbShort)
 Short description.
char * STRZERO (const char *, xbShort, xbShort)
 Short description.
char * STRZERO (xbDouble)
 Short description.
char * STRZERO (xbDouble, xbShort)
 Short description.
char * STRZERO (xbDouble, xbShort, xbShort)
 Short description.
char * SUBSTR (const char *, xbShort, xbShort)
 Short description.
char * TRIM (const char *)
 Short description.
char * UPPER (const char *)
 Short description.
xbLong VAL (const char *)
 Short description.
xbLong YEAR (const char *)
 Short description.

Protected Member Functions

xbShort IsWhiteSpace (char)
 IsWhiteSpace.
char IsSeparator (char)
 IsSeparator.
xbExpNodeLoadExpNode (const char *ENodeText, const char EType, const xbShort ELen, const xbShort BufLen)
 GetExpNode.
xbShort OperatorWeight (const char *Oper, xbShort len)
 OperatorWeight.
xbShort ReduceComplexExpression (const char *NextToken, xbShort Len, xbExpNode *cn, xbDbf *d)
 ReduceComplexExpression.
xbShort GetFunctionTokenLen (const char *s)
 GetFunctionTokenLen.
xbShort ReduceFunction (const char *NextToken, xbExpNode *cn, xbDbf *d)
 ReduceFunction.
xbExpNodeGetNextTreeNode (xbExpNode *)
 Short description.
xbShort ProcessOperator (xbShort)
 Short description.
xbShort ProcessFunction (char *)
 Short description.
xbShort ValidOperation (char *, char, char)
 Short description.
char GetOperandType (xbExpNode *)
 Short description.
xbShort AlphaOperation (char *)
 Short description.
xbShort NumericOperation (char *)
 Short description.
xbShort GetFuncInfo (const char *Function, xbShort Option)
 Get information on a function.
xbDouble GetDoub (xbExpNode *)
 Short description.
xbLong GetInt (xbExpNode *)
 Short description.

Detailed Description

xbExpn class

This class is used for processing expressions


Constructor & Destructor Documentation

xbExpn::xbExpn ( xbXBase x  ) 

xbExpn Constructor

xbExpn::~xbExpn (  )  [virtual]

xbExpn Destructor


Member Function Documentation

xbDouble xbExpn::ABS ( xbDouble  d  ) 

Short description.

Parameters:
d 
xbShort xbExpn::AlphaOperation ( char *  Operator  )  [protected]

Short description.

Parameters:
Operator 
xbLong xbExpn::ASC ( const char *  String  ) 

Short description.

Parameters:
String 
xbLong xbExpn::AT ( const char *  s1,
const char *  s2 
)

Short description.

Parameters:
s1 
s2 
xbShort xbExpn::BuildExpressionTree ( const char *  Expression,
xbShort  MaxTokenLen,
xbDbf d 
)

BuildExpressionTree.

char * xbExpn::CDOW ( const char *  Date8  ) 

Short description.

Parameters:
Date8 
char * xbExpn::CHR ( xbLong  l  ) 

Short description.

Parameters:
l 
char * xbExpn::CMONTH ( const char *  Date8  ) 

Short description.

Parameters:
Date8 
char * xbExpn::CTOD ( const char *  indate  ) 

Short description.

Parameters:
indate 
char * xbExpn::DATE (  ) 

Short description.

xbLong xbExpn::DAY ( const char *  Date8  ) 

Short description.

Parameters:
Date8 
xbDouble xbExpn::DESCEND ( xbDouble  d  ) 

Short description.

Parameters:
num 
xbLong xbExpn::DESCEND ( const xbDate date  ) 

Short description.

Parameters:
date 
char * xbExpn::DESCEND ( const char *  str  ) 

Short description.

Parameters:
str 
xbLong xbExpn::DOW ( const char *  Date8  ) 

Short description.

Parameters:
Date8 
char * xbExpn::DTOC ( const char *  Date8  ) 

Short description.

Parameters:
Date8 
char * xbExpn::DTOS ( const char *  Date8  ) 

Short description.

Parameters:
Date8 
void xbExpn::DumpExpNode ( xbExpNode e,
xbShort  printOption 
)

DumpExpNode.

void xbExpn::DumpExpressionTree ( xbExpNode E,
xbShort  printOption 
)

DumpExpressionTree.

void xbExpn::DumpExpressionTree ( xbShort  printOption  )  [inline]
void xbExpn::DumpStack (  ) 

Short description.

xbDouble xbExpn::EXP ( xbDouble  d  ) 

Short description.

Parameters:
d 
char* xbExpn::GetCharResult (  ) 
xbDouble xbExpn::GetDoub ( xbExpNode p  )  [protected]

Short description.

Parameters:
p 
xbDouble xbExpn::GetDoubleResult (  ) 

Short description.

xbExpNode * xbExpn::GetExpressionHandle (  ) 

GetExpressionHandle.

char xbExpn::GetExpressionResultType (  )  [inline]
char xbExpn::GetExpressionResultType ( xbExpNode e  ) 

GetExpressionResultType.

xbExpNode* xbExpn::GetFirstTreeNode (  )  [inline]
xbExpNode * xbExpn::GetFirstTreeNode ( xbExpNode e  ) 

Short description.

Parameters:
e 
xbShort xbExpn::GetFuncInfo ( const char *  Function,
xbShort  Option 
) [protected]

Get information on a function.

Returns the information specifed (Option) for the specified function.

Parameters:
Function name of function to get information about
Option One of the following:

OptionDescription
1Return minimum number of parms
2Return function result type
?Return 0 if valid function
Returns:
requested information or -1 on failure.
xbShort xbExpn::GetFunctionTokenLen ( const char *  s  )  [protected]

GetFunctionTokenLen.

xbLong xbExpn::GetInt ( xbExpNode p  )  [protected]

Short description.

Parameters:
p 
xbLong xbExpn::GetIntResult (  ) 

Short description.

xbShort xbExpn::GetNextToken ( const char *  s,
xbShort  MaxLen 
)

GetNextToken.

xbExpNode * xbExpn::GetNextTreeNode ( xbExpNode e  )  [protected]

Short description.

Parameters:
e 
char xbExpn::GetOperandType ( xbExpNode e  )  [protected]

Short description.

Parameters:
e 
xbShort xbExpn::GetStackDepth (  )  [inline]
xbString & xbExpn::GetStringResult (  ) 

Short description.

xbExpNode* xbExpn::GetTree (  )  [inline]
const char* xbExpn::GetValidFuncName ( xbShort  funcNo  )  [inline]
char * xbExpn::IIF ( xbShort  ifCondition,
const char *  trueRslt,
const char *  falseRslt 
)

Short description.

Parameters:
ifCondition 
trueRslt 
falseRslt 
void xbExpn::InitStack (  ) 

Destructor.

Short description.

xbLong xbExpn::INT ( xbDouble  d  ) 

Short description.

Parameters:
d 
xbLong xbExpn::ISALPHA ( const char *  String  ) 

Short description.

Parameters:
String 
xbLong xbExpn::ISLOWER ( const char *  String  ) 

Short description.

Parameters:
String 
char xbExpn::IsSeparator ( char  c  )  [protected]

IsSeparator.

xbLong xbExpn::ISUPPER ( const char *  String  ) 

Short description.

Parameters:
String 
xbShort xbExpn::IsWhiteSpace ( char  c  )  [protected]

IsWhiteSpace.

char * xbExpn::LEFT ( const char *  String,
xbShort  Len 
)

Short description.

Parameters:
String 
Len 
xbLong xbExpn::LEN ( const char *  String  ) 

Short description.

Parameters:
String 
xbExpNode * xbExpn::LoadExpNode ( const char *  ENodeText,
const char  EType,
const xbShort  ELen,
const xbShort  BufLen 
) [protected]

GetExpNode.

LoadExpNode

xbDouble xbExpn::LOG ( xbDouble  d  ) 

Short description.

Parameters:
d 
char * xbExpn::LOWER ( const char *  String  ) 

Short description.

Parameters:
String 
char * xbExpn::LTRIM ( const char *  String  ) 

Short description.

Parameters:
String 
xbDouble xbExpn::MAX ( xbDouble  d1,
xbDouble  d2 
)

Short description.

Parameters:
d1 
d2 
xbDouble xbExpn::MIN ( xbDouble  d1,
xbDouble  d2 
)

Short description.

Parameters:
d1 
d2 
xbLong xbExpn::MONTH ( const char *  Date8  ) 

Short description.

Parameters:
Date8 
xbShort xbExpn::NumericOperation ( char *  Operator  )  [protected]

Short description.

Parameters:
Operator 
xbShort xbExpn::OperatorWeight ( const char *  Oper,
xbShort  len 
) [protected]

OperatorWeight.

This function determines the priority of an operator

xbShort xbExpn::ParseExpression ( const char *  exp,
xbDbf d 
)

ParseExpression.

xbExpNode * xbExpn::Pop (  ) 

Pop the top value from the stack.

xbShort xbExpn::ProcessExpression (  )  [inline]
xbShort xbExpn::ProcessExpression ( xbExpNode e  ) 

Short description.

Parameters:
e 
xbShort xbExpn::ProcessExpression ( const char *  exp,
xbDbf d 
)

ProcessExpression.

xbShort xbExpn::ProcessExpression ( xbShort  opt  )  [inline]
xbShort xbExpn::ProcessExpression ( xbExpNode Wtree,
xbShort  RecBufSw 
)

Short description.

Parameters:
Wtree 
RecBufSw 
xbShort xbExpn::ProcessFunction ( char *  Func  )  [protected]

Short description.

Parameters:
Func 
xbShort xbExpn::ProcessOperator ( xbShort  RecBufSw  )  [protected]

Short description.

Parameters:
RecBufSw 
xbShort xbExpn::Push ( xbExpNode p  ) 

Push a value onto the stack.

Parameters:
p 
xbLong xbExpn::RECNO ( xbDbf d  ) 

Short description.

Parameters:
d 
xbShort xbExpn::ReduceComplexExpression ( const char *  NextToken,
xbShort  Len,
xbExpNode cn,
xbDbf d 
) [protected]

ReduceComplexExpression.

xbShort xbExpn::ReduceFunction ( const char *  NextToken,
xbExpNode cn,
xbDbf d 
) [protected]

ReduceFunction.

char * xbExpn::REPLICATE ( const char *  String,
xbShort  Cnt 
)

Short description.

Parameters:
String 
Cnt 
char * xbExpn::RIGHT ( const char *  String,
xbShort  cnt 
)

Short description.

Parameters:
String cnt
char * xbExpn::RTRIM ( const char *  String  ) 

Short description.

Parameters:
String 
void xbExpn::SetTreeToNull (  )  [inline]
char * xbExpn::SPACE ( xbShort  Cnt  ) 

Short description.

Parameters:
Cnt 
xbDouble xbExpn::SQRT ( xbDouble  d  ) 

Short description.

Parameters:
d 
char * xbExpn::STR ( xbDouble  d,
xbUShort  length,
xbShort  numDecimals 
)

Short description.

Parameters:
d 
length 
numDecimals 
char * xbExpn::STR ( xbDouble  d,
xbShort  length 
)

Short description.

Parameters:
d 
length 
char * xbExpn::STR ( xbDouble  d  ) 

Short description.

Parameters:
d 
char * xbExpn::STR ( const char *  String,
xbShort  length,
xbShort  dec 
)

Short description.

Parameters:
String 
length 
 
char * xbExpn::STR ( const char *  String,
xbShort  length 
)

Short description.

Parameters:
String 
length 
char * xbExpn::STR ( const char *  String  ) 

Short description.

Parameters:
String 
char * xbExpn::STRZERO ( xbDouble  d,
xbShort  length,
xbShort   
)

Short description.

Parameters:
d 
length 
 
char * xbExpn::STRZERO ( xbDouble  d,
xbShort  length 
)

Short description.

Parameters:
d 
length 
char * xbExpn::STRZERO ( xbDouble  d  ) 

Short description.

Parameters:
d 
char * xbExpn::STRZERO ( const char *  String,
xbShort  length,
xbShort   
)

Short description.

Parameters:
String 
length 
 
char * xbExpn::STRZERO ( const char *  String,
xbShort  length 
)

Short description.

Parameters:
String 
length 
char * xbExpn::STRZERO ( const char *  String  ) 

Short description.

Parameters:
String 
char * xbExpn::SUBSTR ( const char *  String,
xbShort  StartPos,
xbShort  Len 
)

Short description.

Parameters:
String 
StartPos 
Len 
char * xbExpn::TRIM ( const char *  String  ) 

Short description.

Parameters:
String 
char * xbExpn::UPPER ( const char *  String  ) 

Short description.

Parameters:
String 
xbLong xbExpn::VAL ( const char *  String  ) 

Short description.

Parameters:
String 
xbShort xbExpn::ValidOperation ( char *  Operand,
char  Op1,
char  Op2 
) [protected]

Short description.

Parameters:
Operand 
Op1 Op2
xbLong xbExpn::YEAR ( const char *  Date8  ) 

Short description.

Parameters:
Date8 

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

Generated on 8 Jul 2010 for Xbase64 Class Library by  doxygen 1.6.1