17 #ifndef QGSEXPRESSIONNODE_H 18 #define QGSEXPRESSIONNODE_H 22 #include <QCoreApplication> 39 switch ( sipCpp->nodeType() )
42 sipType = sipType_QgsExpressionNodeUnaryOperator;
45 sipType = sipType_QgsExpressionNodeBinaryOperator;
48 sipType = sipType_QgsExpressionNodeInOperator;
51 sipType = sipType_QgsExpressionNodeFunction;
54 sipType = sipType_QgsExpressionNodeLiteral;
57 sipType = sipType_QgsExpressionNodeColumnRef;
60 sipType = sipType_QgsExpressionNodeCondition;
133 int count()
const {
return mList.count(); }
144 QList<QgsExpressionNode *>
list() {
return mList; }
157 QStringList
names()
const {
return mNameList; }
165 virtual QString dump()
const;
168 QList<QgsExpressionNode *> mList;
169 QStringList mNameList;
171 bool mHasNamedNodes =
false;
190 virtual QString dump()
const = 0;
219 virtual QSet<QString> referencedColumns()
const = 0;
224 virtual QSet<QString> referencedVariables()
const = 0;
229 virtual QSet<QString> referencedFunctions()
const = 0;
237 virtual QList<const QgsExpressionNode *> nodes( )
const = 0;
SIP_SKIP 247 virtual bool needsGeometry()
const = 0;
274 int parserFirstLine = 0;
281 int parserFirstColumn = 0;
288 int parserLastLine = 0;
295 int parserLastColumn = 0;
326 bool mHasCachedValue =
false;
327 QVariant mCachedStaticValue;
332 #endif // QGSEXPRESSIONNODE_H Class for parsing and evaluation of expressions (formerly called "search strings").
QStringList names() const
Returns a list of names for nodes.
QgsExpressionNode * at(int i)
Gets the node at position i in the list.
NodeType
Known node types.
Q_DECLARE_METATYPE(QModelIndex)
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
NamedNode(const QString &name, QgsExpressionNode *node)
Constructor for NamedNode.
Abstract base class for all nodes that can appear in an expression.
A list of expression nodes.
QList< QgsExpressionNode * > list()
Gets a list of all the nodes.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
int count() const
Returns the number of nodes in the list.
void append(QgsExpressionNode *node)
Takes ownership of the provided node.
bool hasNamedNodes() const
Returns true if list contains any named nodes.