QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
qgsexpressionnodeimpl.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsexpressionnodeimpl.h
3  -------------------
4  begin : May 2017
5  copyright : (C) 2017 Matthias Kuhn
6  email : [email protected]
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 
17 #ifndef QGSEXPRESSIONNODEIMPL_H
18 #define QGSEXPRESSIONNODEIMPL_H
19 
20 #include "qgsexpressionnode.h"
21 #include "qgsinterval.h"
22 
28 {
29  public:
30 
36  {
39  };
40 
45  : mOp( op )
46  , mOperand( operand )
47  {}
48  ~QgsExpressionNodeUnaryOperator() override { delete mOperand; }
49 
54 
58  QgsExpressionNode *operand() const { return mOperand; }
59 
60  QgsExpressionNode::NodeType nodeType() const override;
61  bool prepareNode( QgsExpression *parent, const QgsExpressionContext *context ) override;
62  QVariant evalNode( QgsExpression *parent, const QgsExpressionContext *context ) override;
63  QString dump() const override;
64 
65  QSet<QString> referencedColumns() const override;
66  QSet<QString> referencedVariables() const override;
67  QSet<QString> referencedFunctions() const override;
68  QList<const QgsExpressionNode *> nodes() const override; SIP_SKIP
69  bool needsGeometry() const override;
70  QgsExpressionNode *clone() const override SIP_FACTORY;
71 
72  bool isStatic( QgsExpression *parent, const QgsExpressionContext *context ) const override;
73 
78  QString text() const;
79 
80  private:
81  UnaryOperator mOp;
82  QgsExpressionNode *mOperand = nullptr;
83 
84  static const char *UNARY_OPERATOR_TEXT[];
85 };
86 
92 {
93  public:
94 
100  {
101  // logical
104 
105  // comparison
119 
120  // math
128 
129  // strings
131  };
132 
137  : mOp( op )
138  , mOpLeft( opLeft )
139  , mOpRight( opRight )
140  {}
141  ~QgsExpressionNodeBinaryOperator() override { delete mOpLeft; delete mOpRight; }
142 
147 
152  QgsExpressionNode *opLeft() const { return mOpLeft; }
153 
158  QgsExpressionNode *opRight() const { return mOpRight; }
159 
160  QgsExpressionNode::NodeType nodeType() const override;
161  bool prepareNode( QgsExpression *parent, const QgsExpressionContext *context ) override;
162  QVariant evalNode( QgsExpression *parent, const QgsExpressionContext *context ) override;
163  QString dump() const override;
164 
165  QSet<QString> referencedColumns() const override;
166  QSet<QString> referencedVariables() const override;
167  QSet<QString> referencedFunctions() const override;
168  QList<const QgsExpressionNode *> nodes( ) const override; SIP_SKIP
169 
170  bool needsGeometry() const override;
171  QgsExpressionNode *clone() const override SIP_FACTORY;
172  bool isStatic( QgsExpression *parent, const QgsExpressionContext *context ) const override;
173 
177  int precedence() const;
178 
182  bool leftAssociative() const;
183 
188  QString text() const;
189 
190  private:
191  bool compare( double diff );
192  qlonglong computeInt( qlonglong x, qlonglong y );
193  double computeDouble( double x, double y );
194 
200  QDateTime computeDateTimeFromInterval( const QDateTime &d, QgsInterval *i );
201 
202  BinaryOperator mOp;
203  QgsExpressionNode *mOpLeft = nullptr;
204  QgsExpressionNode *mOpRight = nullptr;
205 
206  static const char *BINARY_OPERATOR_TEXT[];
207 };
208 
215 {
216  public:
217 
222  : mContainer( container )
223  , mIndex( index )
224  {}
225  ~QgsExpressionNodeIndexOperator() override { delete mContainer; delete mIndex; }
226 
231  QgsExpressionNode *container() const { return mContainer; }
232 
237  QgsExpressionNode *index() const { return mIndex; }
238 
239  QgsExpressionNode::NodeType nodeType() const override;
240  bool prepareNode( QgsExpression *parent, const QgsExpressionContext *context ) override;
241  QVariant evalNode( QgsExpression *parent, const QgsExpressionContext *context ) override;
242  QString dump() const override;
243 
244  QSet<QString> referencedColumns() const override;
245  QSet<QString> referencedVariables() const override;
246  QSet<QString> referencedFunctions() const override;
247  QList<const QgsExpressionNode *> nodes( ) const override; SIP_SKIP
248 
249  bool needsGeometry() const override;
250  QgsExpressionNode *clone() const override SIP_FACTORY;
251  bool isStatic( QgsExpression *parent, const QgsExpressionContext *context ) const override;
252 
253  private:
254 
255  QgsExpressionNode *mContainer = nullptr;
256  QgsExpressionNode *mIndex = nullptr;
257 
258 };
259 
265 {
266  public:
267 
272  : mNode( node )
273  , mList( list )
274  , mNotIn( notin )
275  {}
276  ~QgsExpressionNodeInOperator() override;
277 
281  QgsExpressionNode *node() const { return mNode; }
282 
286  bool isNotIn() const { return mNotIn; }
287 
291  QgsExpressionNode::NodeList *list() const { return mList; }
292 
293  QgsExpressionNode::NodeType nodeType() const override;
294  bool prepareNode( QgsExpression *parent, const QgsExpressionContext *context ) override;
295  QVariant evalNode( QgsExpression *parent, const QgsExpressionContext *context ) override;
296  QString dump() const override;
297 
298  QSet<QString> referencedColumns() const override;
299  QSet<QString> referencedVariables() const override;
300  QSet<QString> referencedFunctions() const override;
301  QList<const QgsExpressionNode *> nodes() const override; SIP_SKIP
302  bool needsGeometry() const override;
303  QgsExpressionNode *clone() const override SIP_FACTORY;
304  bool isStatic( QgsExpression *parent, const QgsExpressionContext *context ) const override;
305 
306  private:
307  QgsExpressionNode *mNode = nullptr;
308  QgsExpressionNodeInOperator::NodeList *mList = nullptr;
309  bool mNotIn;
310 };
311 
317 {
318  public:
319 
325 
326  ~QgsExpressionNodeFunction() override;
327 
331  int fnIndex() const { return mFnIndex; }
332 
336  QgsExpressionNode::NodeList *args() const { return mArgs; }
337 
338  QgsExpressionNode::NodeType nodeType() const override;
339  bool prepareNode( QgsExpression *parent, const QgsExpressionContext *context ) override;
340  QVariant evalNode( QgsExpression *parent, const QgsExpressionContext *context ) override;
341  QString dump() const override;
342 
343  QSet<QString> referencedColumns() const override;
344  QSet<QString> referencedVariables() const override;
345  QSet<QString> referencedFunctions() const override;
346 
347  QList<const QgsExpressionNode *> nodes() const override; SIP_SKIP
348  bool needsGeometry() const override;
349  QgsExpressionNode *clone() const override SIP_FACTORY;
350  bool isStatic( QgsExpression *parent, const QgsExpressionContext *context ) const override;
351 
353  static bool validateParams( int fnIndex, QgsExpressionNode::NodeList *args, QString &error );
354 
355  private:
356  int mFnIndex;
357  NodeList *mArgs = nullptr;
358 };
359 
364 class CORE_EXPORT QgsExpressionNodeLiteral : public QgsExpressionNode
365 {
366  public:
367 
371  QgsExpressionNodeLiteral( const QVariant &value )
372  : mValue( value )
373  {}
374 
376  inline QVariant value() const { return mValue; }
377 
378  QgsExpressionNode::NodeType nodeType() const override;
379  bool prepareNode( QgsExpression *parent, const QgsExpressionContext *context ) override;
380  QVariant evalNode( QgsExpression *parent, const QgsExpressionContext *context ) override;
381  QString dump() const override;
382 
383  QSet<QString> referencedColumns() const override;
384  QSet<QString> referencedVariables() const override;
385  QSet<QString> referencedFunctions() const override;
386 
387  QList<const QgsExpressionNode *> nodes() const override; SIP_SKIP
388  bool needsGeometry() const override;
389  QgsExpressionNode *clone() const override SIP_FACTORY;
390  bool isStatic( QgsExpression *parent, const QgsExpressionContext *context ) const override;
391 
392  private:
393  QVariant mValue;
394 };
395 
401 {
402  public:
403 
408  QgsExpressionNodeColumnRef( const QString &name )
409  : mName( name )
410  , mIndex( -1 )
411  {}
412 
414  QString name() const { return mName; }
415 
416  QgsExpressionNode::NodeType nodeType() const override;
417  bool prepareNode( QgsExpression *parent, const QgsExpressionContext *context ) override;
418  QVariant evalNode( QgsExpression *parent, const QgsExpressionContext *context ) override;
419  QString dump() const override;
420 
421  QSet<QString> referencedColumns() const override;
422  QSet<QString> referencedVariables() const override;
423  QSet<QString> referencedFunctions() const override;
424  QList<const QgsExpressionNode *> nodes( ) const override; SIP_SKIP
425 
426  bool needsGeometry() const override;
427 
428  QgsExpressionNode *clone() const override SIP_FACTORY;
429  bool isStatic( QgsExpression *parent, const QgsExpressionContext *context ) const override;
430 
431  private:
432  QString mName;
433  int mIndex;
434 };
435 
441 {
442  public:
443 
448  class CORE_EXPORT WhenThen
449  {
450  public:
451 
455  WhenThen( QgsExpressionNode *whenExp, QgsExpressionNode *thenExp );
456  ~WhenThen();
457 
459  WhenThen( const WhenThen &rh ) = delete;
461  WhenThen &operator=( const WhenThen &rh ) = delete;
462 
467 
472  QgsExpressionNode *whenExp() const { return mWhenExp; }
473 
479  QgsExpressionNode *thenExp() const { return mThenExp; }
480 
481  private:
482 #ifdef SIP_RUN
484 #endif
485  QgsExpressionNode *mWhenExp = nullptr;
486  QgsExpressionNode *mThenExp = nullptr;
487 
489  };
490  typedef QList<QgsExpressionNodeCondition::WhenThen *> WhenThenList;
491 
496 
501  : mConditions( conditions )
502  , mElseExp( elseExp )
503  {}
504 
505  ~QgsExpressionNodeCondition() override;
506 
507  QgsExpressionNode::NodeType nodeType() const override;
508  QVariant evalNode( QgsExpression *parent, const QgsExpressionContext *context ) override;
509  bool prepareNode( QgsExpression *parent, const QgsExpressionContext *context ) override;
510  QString dump() const override;
511 
516  WhenThenList conditions() const { return mConditions; }
517 
522  QgsExpressionNode *elseExp() const { return mElseExp; }
523 
524  QSet<QString> referencedColumns() const override;
525  QSet<QString> referencedVariables() const override;
526  QSet<QString> referencedFunctions() const override;
527 
528  QList<const QgsExpressionNode *> nodes() const override; SIP_SKIP
529 
530  bool needsGeometry() const override;
531  QgsExpressionNode *clone() const override SIP_FACTORY;
532  bool isStatic( QgsExpression *parent, const QgsExpressionContext *context ) const override;
533 
534  private:
535  WhenThenList mConditions;
536  QgsExpressionNode *mElseExp = nullptr;
537 };
538 
539 
540 #endif // QGSEXPRESSIONNODEIMPL_H
QgsExpressionNode::dump
virtual QString dump() const =0
Dump this node into a serialized (part) of an expression.
QgsExpressionContext
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Definition: qgsexpressioncontext.h:370
QgsExpressionNodeBinaryOperator::op
QgsExpressionNodeBinaryOperator::BinaryOperator op() const
Returns the binary operator.
Definition: qgsexpressionnodeimpl.h:146
QgsExpressionNodeCondition::elseExp
QgsExpressionNode * elseExp() const
The ELSE expression used for the condition.
Definition: qgsexpressionnodeimpl.h:522
QgsExpressionNodeBinaryOperator::boILike
@ boILike
Definition: qgsexpressionnodeimpl.h:115
QgsExpressionNodeBinaryOperator::boPlus
@ boPlus
Definition: qgsexpressionnodeimpl.h:121
QgsExpressionNodeCondition::WhenThen::operator=
WhenThen & operator=(const WhenThen &rh)=delete
WhenThen nodes cannot be copied.
QgsExpressionNodeLiteral
An expression node for literal values.
Definition: qgsexpressionnodeimpl.h:365
QgsExpressionNodeColumnRef::QgsExpressionNodeColumnRef
QgsExpressionNodeColumnRef(const QString &name)
Constructor for QgsExpressionNodeColumnRef, referencing the column with the specified name.
Definition: qgsexpressionnodeimpl.h:408
QgsExpressionNodeCondition::referencedFunctions
QSet< QString > referencedFunctions() const override
Returns a set of all functions which are used in this expression.
Definition: qgsexpressionnodeimpl.cpp:1514
QgsExpressionNodeBinaryOperator
A binary expression operator, which operates on two values.
Definition: qgsexpressionnodeimpl.h:92
QgsExpressionNodeIndexOperator::~QgsExpressionNodeIndexOperator
~QgsExpressionNodeIndexOperator() override
Definition: qgsexpressionnodeimpl.h:225
QgsExpressionNodeInOperator::node
QgsExpressionNode * node() const
Returns the expression node.
Definition: qgsexpressionnodeimpl.h:281
QgsExpressionNodeCondition::prepareNode
bool prepareNode(QgsExpression *parent, const QgsExpressionContext *context) override
Abstract virtual preparation method Errors are reported to the parent.
Definition: qgsexpressionnodeimpl.cpp:1456
QgsExpressionNodeBinaryOperator::boRegexp
@ boRegexp
Definition: qgsexpressionnodeimpl.h:112
QgsExpressionNodeBinaryOperator::boLE
@ boLE
<=
Definition: qgsexpressionnodeimpl.h:108
QgsExpressionNodeBinaryOperator::~QgsExpressionNodeBinaryOperator
~QgsExpressionNodeBinaryOperator() override
Definition: qgsexpressionnodeimpl.h:141
QgsExpressionNode::NodeType
NodeType
Known node types.
Definition: qgsexpressionnode.h:75
qgsinterval.h
QgsExpressionNodeBinaryOperator::boGE
@ boGE
>=
Definition: qgsexpressionnodeimpl.h:109
QgsExpressionNodeColumnRef
An expression node which takes it value from a feature's field.
Definition: qgsexpressionnodeimpl.h:401
QgsExpressionNodeLiteral::value
QVariant value() const
The value of the literal.
Definition: qgsexpressionnodeimpl.h:376
QgsExpressionNodeFunction::fnIndex
int fnIndex() const
Returns the index of the node's function.
Definition: qgsexpressionnodeimpl.h:331
QgsExpressionNodeUnaryOperator
A unary node is either negative as in boolean (not) or as in numbers (minus).
Definition: qgsexpressionnodeimpl.h:28
QgsExpressionNode::clone
virtual QgsExpressionNode * clone() const =0
Generate a clone of this node.
QgsExpressionNodeCondition
An expression node for CASE WHEN clauses.
Definition: qgsexpressionnodeimpl.h:441
QgsExpressionNodeCondition::dump
QString dump() const override
Dump this node into a serialized (part) of an expression.
Definition: qgsexpressionnodeimpl.cpp:1473
QgsExpressionNodeLiteral::QgsExpressionNodeLiteral
QgsExpressionNodeLiteral(const QVariant &value)
Constructor for QgsExpressionNodeLiteral, with the specified literal value.
Definition: qgsexpressionnodeimpl.h:371
QgsExpressionNodeUnaryOperator::op
QgsExpressionNodeUnaryOperator::UnaryOperator op() const
Returns the unary operator.
Definition: qgsexpressionnodeimpl.h:53
QgsExpressionNodeCondition::evalNode
QVariant evalNode(QgsExpression *parent, const QgsExpressionContext *context) override
Abstract virtual eval method Errors are reported to the parent.
Definition: qgsexpressionnodeimpl.cpp:1430
QgsExpressionNodeBinaryOperator::boMod
@ boMod
Definition: qgsexpressionnodeimpl.h:126
QgsExpressionNodeInOperator
An expression node for value IN or NOT IN clauses.
Definition: qgsexpressionnodeimpl.h:265
QgsExpressionNodeCondition::referencedColumns
QSet< QString > referencedColumns() const override
Abstract virtual method which returns a list of columns required to evaluate this node.
Definition: qgsexpressionnodeimpl.cpp:1486
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
QgsExpressionNodeBinaryOperator::boMinus
@ boMinus
Definition: qgsexpressionnodeimpl.h:122
QgsExpressionNodeCondition::needsGeometry
bool needsGeometry() const override
Abstract virtual method which returns if the geometry is required to evaluate this expression.
Definition: qgsexpressionnodeimpl.cpp:1543
QgsExpressionNode::referencedFunctions
virtual QSet< QString > referencedFunctions() const =0
Returns a set of all functions which are used in this expression.
QgsExpressionNodeCondition::QgsExpressionNodeCondition
QgsExpressionNodeCondition(QgsExpressionNodeCondition::WhenThenList *conditions, QgsExpressionNode *elseExp=nullptr)
Create a new node with the given list of conditions and an optional elseExp expression.
Definition: qgsexpressionnodeimpl.cpp:1412
SIP_SKIP
#define SIP_SKIP
Definition: qgis_sip.h:126
QgsExpressionNodeUnaryOperator::~QgsExpressionNodeUnaryOperator
~QgsExpressionNodeUnaryOperator() override
Definition: qgsexpressionnodeimpl.h:48
QgsExpressionNodeBinaryOperator::boPow
@ boPow
Definition: qgsexpressionnodeimpl.h:127
QgsExpressionNodeCondition::clone
QgsExpressionNode * clone() const override
Generate a clone of this node.
Definition: qgsexpressionnodeimpl.cpp:1555
QgsExpressionNodeFunction::args
QgsExpressionNode::NodeList * args() const
Returns a list of arguments specified for the function.
Definition: qgsexpressionnodeimpl.h:336
QgsExpressionNodeBinaryOperator::boConcat
@ boConcat
Definition: qgsexpressionnodeimpl.h:130
QgsExpressionNode::referencedColumns
virtual QSet< QString > referencedColumns() const =0
Abstract virtual method which returns a list of columns required to evaluate this node.
QgsExpressionNodeBinaryOperator::QgsExpressionNodeBinaryOperator
QgsExpressionNodeBinaryOperator(QgsExpressionNodeBinaryOperator::BinaryOperator op, QgsExpressionNode *opLeft, QgsExpressionNode *opRight)
Binary combination of the left and the right with op.
Definition: qgsexpressionnodeimpl.h:136
QgsExpressionNode::referencedVariables
virtual QSet< QString > referencedVariables() const =0
Returns a set of all variables which are used in this expression.
QgsExpressionNode::needsGeometry
virtual bool needsGeometry() const =0
Abstract virtual method which returns if the geometry is required to evaluate this expression.
QgsExpressionNodeCondition::nodes
QList< const QgsExpressionNode * > nodes() const override
Returns a list of all nodes which are used in this expression.
Definition: qgsexpressionnodeimpl.cpp:1528
QgsExpressionNodeCondition::conditions
WhenThenList conditions() const
The list of WHEN THEN expression parts of the expression.
Definition: qgsexpressionnodeimpl.h:516
qgsexpressionnode.h
SIP_TRANSFER
#define SIP_TRANSFER
Definition: qgis_sip.h:36
QgsExpressionNodeBinaryOperator::boLT
@ boLT
<
Definition: qgsexpressionnodeimpl.h:110
QgsExpressionNodeBinaryOperator::boNotILike
@ boNotILike
Definition: qgsexpressionnodeimpl.h:116
QgsExpressionNodeUnaryOperator::operand
QgsExpressionNode * operand() const
Returns the node the operator will operate upon.
Definition: qgsexpressionnodeimpl.h:58
QgsExpressionNodeFunction
An expression node for expression functions.
Definition: qgsexpressionnodeimpl.h:317
QgsExpressionNodeCondition::QgsExpressionNodeCondition
QgsExpressionNodeCondition(const QgsExpressionNodeCondition::WhenThenList &conditions, QgsExpressionNode *elseExp=nullptr)
Create a new node with the given list of conditions and an optional elseExp expression.
Definition: qgsexpressionnodeimpl.h:500
QgsExpressionNodeBinaryOperator::boNE
@ boNE
<>
Definition: qgsexpressionnodeimpl.h:107
QgsExpressionNodeBinaryOperator::boIsNot
@ boIsNot
Definition: qgsexpressionnodeimpl.h:118
QgsExpressionNodeBinaryOperator::boLike
@ boLike
Definition: qgsexpressionnodeimpl.h:113
QgsExpressionNodeUnaryOperator::uoNot
@ uoNot
Definition: qgsexpressionnodeimpl.h:37
QgsExpressionNodeCondition::WhenThen::thenExp
QgsExpressionNode * thenExp() const
The expression node that makes the THEN result part of the condition.
Definition: qgsexpressionnodeimpl.h:479
QgsExpressionNodeBinaryOperator::boNotLike
@ boNotLike
Definition: qgsexpressionnodeimpl.h:114
QgsExpressionNode
Abstract base class for all nodes that can appear in an expression.
Definition: qgsexpressionnode.h:35
QgsExpressionNodeUnaryOperator::UnaryOperator
UnaryOperator
list of unary operators
Definition: qgsexpressionnodeimpl.h:36
QgsExpressionNodeCondition::nodeType
QgsExpressionNode::NodeType nodeType() const override
Gets the type of this node.
Definition: qgsexpressionnodeimpl.cpp:1425
QgsExpressionNodeBinaryOperator::boEQ
@ boEQ
=
Definition: qgsexpressionnodeimpl.h:106
QgsExpressionNodeBinaryOperator::boIntDiv
@ boIntDiv
Definition: qgsexpressionnodeimpl.h:125
QgsExpressionNodeBinaryOperator::boIs
@ boIs
Definition: qgsexpressionnodeimpl.h:117
QgsExpressionNodeBinaryOperator::boGT
@ boGT
Definition: qgsexpressionnodeimpl.h:111
QgsExpressionNodeInOperator::isNotIn
bool isNotIn() const
Returns true if this node is a "NOT IN" operator, or false if the node is a normal "IN" operator.
Definition: qgsexpressionnodeimpl.h:286
QgsExpressionNodeColumnRef::name
QString name() const
The name of the column.
Definition: qgsexpressionnodeimpl.h:414
QgsExpressionNodeUnaryOperator::uoMinus
@ uoMinus
Definition: qgsexpressionnodeimpl.h:38
QgsExpressionNodeBinaryOperator::opLeft
QgsExpressionNode * opLeft() const
Returns the node to the left of the operator.
Definition: qgsexpressionnodeimpl.h:152
QgsExpressionNodeIndexOperator::index
QgsExpressionNode * index() const
Returns the index node, representing an array element index or map key.
Definition: qgsexpressionnodeimpl.h:237
QgsExpressionNodeCondition::WhenThen::WhenThen
WhenThen(const WhenThen &rh)=delete
WhenThen nodes cannot be copied.
QgsInterval
A representation of the interval between two datetime values.
Definition: qgsinterval.h:41
QgsExpressionNodeCondition::WhenThen
Represents a "WHEN... THEN..." portation of a CASE WHEN clause in an expression.
Definition: qgsexpressionnodeimpl.h:449
QgsExpressionNodeIndexOperator::container
QgsExpressionNode * container() const
Returns the container node, representing an array or map value.
Definition: qgsexpressionnodeimpl.h:231
QgsExpressionNodeBinaryOperator::boDiv
@ boDiv
Definition: qgsexpressionnodeimpl.h:124
QgsExpressionNodeInOperator::list
QgsExpressionNode::NodeList * list() const
Returns the list of nodes to search for matching values within.
Definition: qgsexpressionnodeimpl.h:291
QgsExpressionNodeBinaryOperator::opRight
QgsExpressionNode * opRight() const
Returns the node to the right of the operator.
Definition: qgsexpressionnodeimpl.h:158
QgsExpressionNodeBinaryOperator::boAnd
@ boAnd
Definition: qgsexpressionnodeimpl.h:103
QgsExpressionNodeCondition::~QgsExpressionNodeCondition
~QgsExpressionNodeCondition() override
Definition: qgsexpressionnodeimpl.cpp:1419
QgsExpressionNode::nodes
virtual QList< const QgsExpressionNode * > nodes() const =0
Returns a list of all nodes which are used in this expression.
QgsExpressionNodeBinaryOperator::boMul
@ boMul
Definition: qgsexpressionnodeimpl.h:123
QgsExpressionNodeCondition::isStatic
bool isStatic(QgsExpression *parent, const QgsExpressionContext *context) const override
Returns true if this node can be evaluated for a static value.
Definition: qgsexpressionnodeimpl.cpp:1566
QgsExpressionNodeBinaryOperator::boOr
@ boOr
Definition: qgsexpressionnodeimpl.h:102
QgsExpressionNodeIndexOperator
A indexing expression operator, which allows use of square brackets [] to reference map and array ite...
Definition: qgsexpressionnodeimpl.h:215
QgsExpression
Class for parsing and evaluation of expressions (formerly called "search strings").
Definition: qgsexpression.h:105
QgsExpressionNodeIndexOperator::QgsExpressionNodeIndexOperator
QgsExpressionNodeIndexOperator(QgsExpressionNode *container, QgsExpressionNode *index)
Constructor for QgsExpressionNodeIndexOperator.
Definition: qgsexpressionnodeimpl.h:221
QgsExpressionNode::NodeList
A list of expression nodes.
Definition: qgsexpressionnode.h:118
QgsExpressionNodeInOperator::QgsExpressionNodeInOperator
QgsExpressionNodeInOperator(QgsExpressionNode *node, QgsExpressionNode::NodeList *list, bool notin=false)
This node tests if the result of node is in the result of list.
Definition: qgsexpressionnodeimpl.h:271
QgsExpressionNodeCondition::WhenThenList
QList< QgsExpressionNodeCondition::WhenThen * > WhenThenList
Definition: qgsexpressionnodeimpl.h:490
QgsExpressionNode::nodeType
virtual QgsExpressionNode::NodeType nodeType() const =0
Gets the type of this node.
QgsExpressionNodeBinaryOperator::BinaryOperator
BinaryOperator
list of binary operators
Definition: qgsexpressionnodeimpl.h:100
QgsExpressionNodeUnaryOperator::QgsExpressionNodeUnaryOperator
QgsExpressionNodeUnaryOperator(QgsExpressionNodeUnaryOperator::UnaryOperator op, QgsExpressionNode *operand)
A node unary operator is modifying the value of operand by negating it with op.
Definition: qgsexpressionnodeimpl.h:44
QgsExpressionNodeCondition::referencedVariables
QSet< QString > referencedVariables() const override
Returns a set of all variables which are used in this expression.
Definition: qgsexpressionnodeimpl.cpp:1500