32 #pragma warning( disable:4251 )
59 QtxEvalExpr(
const bool,
const QString& = QString() );
62 QVariant calculate(
const QString& = QString() );
64 QString expression()
const;
65 void setExpression(
const QString& );
70 bool autoDeleteOperationSets()
const;
71 void setAutoDeleteOperationSets(
const bool );
74 QtxEvalSet* operationSet(
const QString& )
const;
76 void insertOperationSet(
QtxEvalSet*,
const int = -1 );
79 void intialize(
const bool,
const QString& );
93 QVariant calculate(
const QString& );
94 bool setExpression(
const QString& );
97 QtxEvalSet* operationSet(
const QString& )
const;
99 void insertOperationSet(
QtxEvalSet*,
const int = -1 );
101 bool autoDeleteOperationSets()
const;
102 void setAutoDeleteOperationSets(
const bool );
104 virtual void clearParameters();
105 virtual bool removeParameter(
const QString& name );
106 virtual QVariant parameter(
const QString& name )
const;
107 virtual bool hasParameter(
const QString& name )
const;
108 virtual void setParameter(
const QString& name,
const QVariant& value );
109 QStringList parameters()
const;
113 bool firstInvalid( QString& )
const;
114 void removeInvalids();
115 QString dump()
const;
144 QString dump(
const Postfix& )
const;
145 virtual bool prepare(
const QString&,
Postfix& );
146 virtual bool setOperationTypes(
Postfix& );
148 const QStringList&,
int f = -1,
int l = -1 );
150 virtual bool parse(
const QString& );
153 bool calculate(
const QString&, QVariant&, QVariant& );
155 static int search(
const QStringList&,
const QString&,
156 int offset,
int& matchLen,
int& listind );
157 static QString note(
const QString& str,
int pos,
int len );
158 static int globalBrackets(
const Postfix&,
int,
int );
161 void operationList( QStringList& )
const;
162 void bracketsList( QStringList&,
bool )
const;
163 bool createValue(
const QString&, QVariant& )
const;
164 int priority(
const QString&,
bool isBin )
const;
169 bool checkOperations()
const;
185 virtual QString name()
const = 0;
187 virtual void operationList( QStringList& )
const = 0;
189 virtual void bracketsList( QStringList&,
bool open )
const = 0;
191 virtual bool createValue(
const QString&, QVariant& )
const;
193 virtual int priority(
const QString&,
bool isBin )
const = 0;
198 virtual QtxEvalExpr::Error calculate(
const QString&, QVariant&, QVariant& )
const = 0;
208 virtual void bracketsList( QStringList&,
bool open )
const;
216 void addOperations(
const QStringList& );
229 virtual bool createValue(
const QString&, QVariant& )
const;
230 virtual int priority(
const QString&,
bool isBin )
const;
233 static QString Name();
234 virtual QString
name()
const;
243 virtual bool createValue(
const QString&, QVariant& )
const;
244 virtual int priority(
const QString&,
bool isBin )
const;
247 static QString Name();
248 virtual QString
name()
const;
251 int intValue(
const QVariant& v )
const;
260 virtual bool createValue(
const QString&, QVariant& )
const;
261 virtual int priority(
const QString&,
bool isBin )
const;
264 static QString Name();
265 virtual QString
name()
const;
274 virtual bool createValue(
const QString&, QVariant& )
const;
275 virtual int priority(
const QString&,
bool isBin )
const;
278 static QString Name();
279 virtual QString
name()
const;
291 virtual void bracketsList( QStringList&,
bool open )
const;
292 virtual int priority(
const QString&,
bool isBin )
const;
297 static void add(
ValueSet&,
const QVariant& );
299 static void remove(
ValueSet&,
const QVariant& );
302 static QString Name();
303 virtual QString
name()
const;
312 static QString Name();
313 virtual QString
name()
const;
315 virtual bool createValue(
const QString&, QVariant& )
const;
318 virtual void bracketsList( QStringList&,
bool open )
const;
319 virtual int priority(
const QString&,
bool isBin )
const;
325 #endif // QTXEVALEXPR_H