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;
132 int count()
const {
return mList.count(); }
143 QList<QgsExpressionNode *>
list() {
return mList; }
156 QStringList
names()
const {
return mNameList; }
164 virtual QString dump()
const;
167 QList<QgsExpressionNode *> mList;
168 QStringList mNameList;
170 bool mHasNamedNodes =
false;
189 virtual QString dump()
const = 0;
218 virtual QSet<QString> referencedColumns()
const = 0;
223 virtual QSet<QString> referencedVariables()
const = 0;
228 virtual QSet<QString> referencedFunctions()
const = 0;
236 virtual QList<const QgsExpressionNode *> nodes( )
const = 0;
SIP_SKIP 246 virtual bool needsGeometry()
const = 0;
273 int parserFirstLine = 0;
280 int parserFirstColumn = 0;
287 int parserLastLine = 0;
294 int parserLastColumn = 0;
325 bool mHasCachedValue =
false;
326 QVariant mCachedStaticValue;
331 #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.