27#ifdef XB_FUNCTION_SUPPORT
28#define XB_EXP_CHAR 'C'
29#define XB_EXP_DATE 'D'
30#define XB_EXP_LOGICAL 'L'
31#define XB_EXP_NUMERIC 'N'
32#define XB_EXP_UNKNOWN 'U'
35#ifdef XB_EXPRESSION_SUPPORT
37#define XB_EXP_CONSTANT 'C'
38#define XB_EXP_FUNCTION 'F'
39#define XB_EXP_FIELD 'D'
40#define XB_EXP_OPERATOR 'O'
41#define XB_EXP_NOTROOT 'N'
42#define XB_EXP_PRE_OPERATOR 'B'
43#define XB_EXP_POST_OPERATOR 'A'
45#define XB_END_OF_EXPRESSION -100
54struct XBDLLEXPORT xbExpToken {
69 xbExpToken() { cNodeType = 0; cReturnType = 0; iSts = 0; cPrevNodeType = 0; cPrevReturnType = 0; }
132class XBDLLEXPORT xbExp{
138 void ClearTreeHandle();
141 #ifdef XB_DEBUG_SUPPORT
142 void DumpTree( xbInt16 iOption );
143 void DumpToken( xbExpToken &t, xbInt16 iOption = 0 );
146 xbInt16 GetResultLen()
const;
147 char GetReturnType()
const;
148 xbInt16 GetBoolResult(
xbBool &bResult );
149 xbInt16 GetDateResult( xbDate &dtResult );
150 xbInt16 GetNumericResult(
xbDouble &dResult );
151 xbInt16 GetStringResult( xbString &sResult );
152 xbInt16 GetStringResult(
char * vpResult, xbUInt32 ulLen );
153 xbExpNode *GetTreeHandle();
154 xbInt16 ParseExpression(
const xbString &sExpression );
155 xbInt16 ParseExpression(
xbDbf *dbf,
const xbString &sExpression );
156 xbInt16 ProcessExpression();
157 xbInt16 ProcessExpression( xbInt16 iRecBufSw );
161 xbInt16 GetNextToken( xbExpToken &t );
162 xbInt16 OperatorWeight(
const xbString &sOperator );
163 xbExpNode *GetNextNode( xbExpNode * n )
const;
168 xbInt16 CalcFunctionResultLen( xbExpNode *n )
const;
169 xbInt16 CalcCharNodeLen( xbExpNode *n );
170 xbInt16 CheckParensAndQuotes(
const xbString &sExpression );
171 xbInt16 GetExpressionResultLen()
const;
173 xbInt16 GetTokenCharConstant ( xbExpToken &t );
174 xbInt16 GetTokenDatabaseField ( xbExpToken &t );
175 xbInt16 GetTokenDateConstant ( xbExpToken &t );
176 xbInt16 GetTokenFunction ( xbExpToken &t );
177 xbInt16 GetTokenLogicalConstant( xbExpToken &t );
178 xbInt16 GetTokenNumericConstant( xbExpToken &t );
179 xbInt16 GetTokenOperator ( xbExpToken &t );
180 xbInt16 GetTokenParen ( xbExpToken &t );
182 xbBool IsFunction (
const xbString &sExp,
char &cReturnType );
183 xbBool IsLogicalConstant (
const xbString &sExp );
184 xbBool IsNumericConstant (
const xbString &sExp,
char cPrevNodeType );
185 xbBool IsOperator (
const xbString &sExp );
186 char IsTokenSeparator (
char c );
187 xbBool IsWhiteSpace (
char c );
189 xbInt16 ParseExpression (
const xbString &sExpression, xbInt16 iWeight );
190 xbInt16 ParseExpressionConstant( xbExpToken &t, xbExpNode *n );
191 xbInt16 ParseExpressionFunction( xbExpToken &t, xbExpNode *n, xbInt16 iWeight );
192 xbInt16 ParseExpressionFunctionParms(
const xbString &sParms, xbLinkList<xbString> &llParms );
193 xbInt16 ParseExpressionField ( xbExpToken &t, xbExpNode *n );
194 xbInt16 ParseExpressionOperator( xbExpToken &t, xbExpNode *n, xbInt16 iWeight );
196 xbInt16 ProcessExpressionFunction( xbExpNode *n, xbInt16 iRecBufSw = 0 );
197 xbInt16 ProcessExpressionOperator( xbExpNode *n );
Definition: xbdate.cpp:19
double xbDouble
Definition: xbtypes.h:23
class XBDLLEXPORT xbXBase
Definition: xbssv.h:27
short int xbBool
Definition: xbtypes.h:24
class XBDLLEXPORT xbDbf
Definition: xbtblmgr.h:28