25#define XB_NULL_DATE 21474835648
28#ifdef XB_FUNCTION_SUPPORT
29#define XB_EXP_CHAR 'C'
30#define XB_EXP_DATE 'D'
31#define XB_EXP_LOGICAL 'L'
32#define XB_EXP_NUMERIC 'N'
33#define XB_EXP_UNKNOWN 'U'
36#ifdef XB_EXPRESSION_SUPPORT
38#define XB_EXP_CONSTANT 'C'
39#define XB_EXP_FUNCTION 'F'
40#define XB_EXP_FIELD 'D'
41#define XB_EXP_OPERATOR 'O'
42#define XB_EXP_NOTROOT 'N'
43#define XB_EXP_PRE_OPERATOR 'B'
44#define XB_EXP_POST_OPERATOR 'A'
46#define XB_END_OF_EXPRESSION -100
55struct XBDLLEXPORT xbExpToken {
70 xbExpToken() { cNodeType = 0; cReturnType = 0; iSts = 0; cPrevNodeType = 0; cPrevReturnType = 0; }
133class XBDLLEXPORT xbExp{
139 void ClearTreeHandle();
142 #ifdef XB_DEBUG_SUPPORT
143 void DumpTree( xbInt16 iOption );
144 void DumpToken( xbExpToken &t, xbInt16 iOption = 0 );
147 xbInt16 GetResultLen()
const;
148 char GetReturnType()
const;
149 xbInt16 GetBoolResult(
xbBool &bResult );
150 xbInt16 GetDateResult( xbDate &dtResult );
151 xbInt16 GetNumericResult(
xbDouble &dResult );
152 xbInt16 GetStringResult( xbString &sResult );
153 xbInt16 GetStringResult(
char * vpResult, xbUInt32 ulLen );
154 xbExpNode *GetTreeHandle();
155 xbInt16 ParseExpression(
const xbString &sExpression );
156 xbInt16 ParseExpression(
xbDbf *dbf,
const xbString &sExpression );
157 xbInt16 ProcessExpression();
158 xbInt16 ProcessExpression( xbInt16 iRecBufSw );
162 xbInt16 GetNextToken( xbExpToken &t );
163 xbInt16 OperatorWeight(
const xbString &sOperator );
164 xbExpNode *GetNextNode( xbExpNode * n )
const;
169 xbInt16 CalcFunctionResultLen( xbExpNode *n )
const;
170 xbInt16 CalcCharNodeLen( xbExpNode *n );
171 xbInt16 CheckParensAndQuotes(
const xbString &sExpression );
172 xbInt16 GetExpressionResultLen()
const;
174 xbInt16 GetTokenCharConstant ( xbExpToken &t );
175 xbInt16 GetTokenDatabaseField ( xbExpToken &t );
176 xbInt16 GetTokenDateConstant ( xbExpToken &t );
177 xbInt16 GetTokenFunction ( xbExpToken &t );
178 xbInt16 GetTokenLogicalConstant( xbExpToken &t );
179 xbInt16 GetTokenNumericConstant( xbExpToken &t );
180 xbInt16 GetTokenOperator ( xbExpToken &t );
181 xbInt16 GetTokenParen ( xbExpToken &t );
183 xbBool IsFunction (
const xbString &sExp,
char &cReturnType );
184 xbBool IsLogicalConstant (
const xbString &sExp );
185 xbBool IsNumericConstant (
const xbString &sExp,
char cPrevNodeType );
186 xbBool IsOperator (
const xbString &sExp );
187 char IsTokenSeparator (
char c );
188 xbBool IsWhiteSpace (
char c );
190 xbInt16 ParseExpression (
const xbString &sExpression, xbInt16 iWeight );
191 xbInt16 ParseExpressionConstant( xbExpToken &t, xbExpNode *n );
192 xbInt16 ParseExpressionFunction( xbExpToken &t, xbExpNode *n, xbInt16 iWeight );
193 xbInt16 ParseExpressionFunctionParms(
const xbString &sParms, xbLinkList<xbString> &llParms );
194 xbInt16 ParseExpressionField ( xbExpToken &t, xbExpNode *n );
195 xbInt16 ParseExpressionOperator( xbExpToken &t, xbExpNode *n, xbInt16 iWeight );
197 xbInt16 ProcessExpressionFunction( xbExpNode *n, xbInt16 iRecBufSw = 0 );
198 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