1 #ifndef _KVI_KVS_TREENODE_EXPRESSION_H_
2 #define _KVI_KVS_TREENODE_EXPRESSION_H_
32 #define PREC_MAXIMUM -10
34 #define PREC_OP_LOGICALNOT -3
35 #define PREC_OP_BITWISENOT -2
36 #define PREC_OP_NEGATE -1
38 #define PREC_OP_BITWISEAND 0
39 #define PREC_OP_BITWISEOR 1
40 #define PREC_OP_BITWISEXOR 2
42 #define PREC_OP_SHIFTRIGHT 3
43 #define PREC_OP_SHIFTLEFT 3
45 #define PREC_OP_MULTIPLICATION 5
46 #define PREC_OP_DIVISION 5
47 #define PREC_OP_MODULUS 5
50 #define PREC_OP_SUBTRACTION 8
52 #define PREC_OP_GREATERTHAN 11
53 #define PREC_OP_LOWERTHAN 11
55 #define PREC_OP_EQUALTO 12
57 #define PREC_OP_GREATEROREQUALTO 14
58 #define PREC_OP_LOWEROREQUALTO 14
60 #define PREC_OP_NOTEQUALTO 15
62 #define PREC_OP_AND 16
64 #define PREC_OP_XOR 18
79 virtual void dump(
const char * prefix);
80 virtual int precedence();
85 virtual int firstBinaryOperator();
101 virtual void dump(
const char * prefix);
116 virtual void dump(
const char * prefix);
128 virtual void dump(
const char * prefix);
142 virtual void dump(
const char * prefix);
155 virtual void dump(
const char * prefix);
168 virtual void dump(
const char * prefix);
181 virtual void dump(
const char * prefix);
204 void dumpOperands(
const char * prefix);
206 virtual void dump(
const char * prefix);
212 #define DECLARE_BINARY_OPERATOR(__name) \
213 class KVIRC_API __name : public KviKvsTreeNodeExpressionBinaryOperator \
216 __name(const QChar * pLocation); \
220 virtual void contextDescription(QString & szBuffer); \
221 virtual void dump(const char * prefix); \
222 virtual bool evaluateReadOnly(KviKvsRunTimeContext * c, KviKvsVariant * pResult); \
223 virtual int precedence(); \
virtual bool evaluateReadOnly(KviKvsRunTimeContext *c, KviKvsVariant *pBuffer)
Definition: KviKvsTreeNodeData.cpp:78
KviKvsVariant * m_pConstant
Definition: KviKvsTreeNodeExpression.h:112
This class defines a new data type which contains variant data.
Definition: KviKvsVariant.h:351
virtual void contextDescription(QString &szBuffer)
Sets the buffer.
Definition: KviKvsTreeNodeExpression.cpp:39
#define KVIRC_API
Definition: kvi_settings.h:128
char s char s char s s s s s char char c s *s c s s s d c s *s d c d d d d c
Definition: KviIrcNumericCodes.h:391
virtual void contextDescription(QString &szBuffer)
Sets the buffer.
Definition: KviKvsTreeNodeExpression.cpp:160
KviKvsNumber m_nLeft
Definition: KviKvsTreeNodeExpression.h:194
virtual int precedence()
Definition: KviKvsTreeNodeExpression.cpp:49
#define DECLARE_BINARY_OPERATOR(__name)
Definition: KviKvsTreeNodeExpression.h:212
KviKvsNumber m_nData
Definition: KviKvsTreeNodeExpression.h:139
virtual KviKvsTreeNodeExpression * left()
Definition: KviKvsTreeNodeExpression.cpp:54
Definition: KviKvsTreeNodeExpression.h:185
KviKvsTreeNodeExpression * m_pParentExpression
Definition: KviKvsTreeNodeExpression.h:75
Definition: KviKvsTreeNodeExpression.h:131
Definition: KviKvsTreeNodeExpression.h:105
virtual void dump(const char *prefix)
Dumps the tree.
Definition: KviKvsTreeNodeExpression.cpp:165
KviKvsTreeNodeExpression * m_pData
Definition: KviKvsTreeNodeExpression.h:138
virtual void dump(const char *prefix)
Dumps the tree.
Definition: KviKvsTreeNodeExpression.cpp:188
Definition: KviKvsTreeNodeExpression.h:67
virtual void setLeft(KviKvsTreeNodeExpression *pLeft)
Definition: KviKvsTreeNodeExpression.cpp:66
virtual void contextDescription(QString &szBuffer)
Sets the buffer.
Definition: KviKvsTreeNodeExpression.cpp:183
KviKvsNumber m_nRight
Definition: KviKvsTreeNodeExpression.h:195
KviKvsTreeNodeExpression * m_pRight
Definition: KviKvsTreeNodeExpression.h:193
Definition: KviKvsTreeNodeExpression.h:91
Definition: KviKvsTreeNodeExpression.h:159
virtual void contextDescription(QString &szBuffer)
Sets the buffer.
Definition: KviKvsTreeNodeData.cpp:36
KviKvsTreeNodeExpression * m_pLeft
Definition: KviKvsTreeNodeExpression.h:192
virtual void setRight(KviKvsTreeNodeExpression *pRight)
Definition: KviKvsTreeNodeExpression.cpp:71
virtual KviKvsTreeNodeExpression * right()
Definition: KviKvsTreeNodeExpression.cpp:60
Definition: KviKvsRunTimeContext.h:103
virtual int firstBinaryOperator()
Definition: KviKvsTreeNodeExpression.cpp:85
virtual void dump(const char *prefix)
Dumps the tree.
Definition: KviKvsTreeNodeData.cpp:41
A class which maps every number.
Definition: KviKvsVariant.h:49
virtual void dump(const char *prefix)
Dumps the tree.
Definition: KviKvsTreeNodeExpression.cpp:44
Handling of variant data type in KVS.
KviKvsTreeNodeExpression * parentExpression()
Definition: KviKvsTreeNodeExpression.h:86
Definition: KviKvsTreeNodeData.h:34
char szBuffer[4096]
Definition: winamp.cpp:77
Definition: KviKvsTreeNodeExpression.h:172
Definition: KviKvsTreeNodeExpression.h:120
KviKvsTreeNodeData * m_pData
Definition: KviKvsTreeNodeExpression.h:98
Definition: KviKvsTreeNodeExpression.h:146
Helper functions for the QString class.
void setParentExpression(KviKvsTreeNodeExpression *pParent)
Definition: KviKvsTreeNodeExpression.h:87