22 if ( mHasCachedValue )
24 return mCachedStaticValue;
28 QVariant res = evalNode( parent, context );
37 mCachedStaticValue = evalNode( parent, context );
39 mHasCachedValue =
true;
41 mHasCachedValue =
false;
46 mHasCachedValue =
false;
47 return prepareNode( parent, context );
53 target->mHasCachedValue = mHasCachedValue;
54 target->mCachedStaticValue = mCachedStaticValue;
Class for parsing and evaluation of expressions (formerly called "search strings").
int parserFirstColumn
First column in the parser this node was found.
bool hasEvalError() const
Returns true if an error occurred when evaluating last input.
bool prepare(QgsExpression *parent, const QgsExpressionContext *context)
Prepare this node for evaluation.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Abstract base class for all nodes that can appear in an expression.
QVariant eval(QgsExpression *parent, const QgsExpressionContext *context)
Evaluate this node with the given context and parent.
int parserLastLine
Last line in the parser this node was found.
int parserFirstLine
First line in the parser this node was found.
void cloneTo(QgsExpressionNode *target) const
Copies the members of this node to the node provided in target.
virtual bool isStatic(QgsExpression *parent, const QgsExpressionContext *context) const =0
Returns true if this node can be evaluated for a static value.
int parserLastColumn
Last column in the parser this node was found.