1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/expression/qgsexpressionnodeimpl.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsExpressionNodeUnaryOperator : QgsExpressionNode
{
%Docstring(signature="appended")
A unary node is either negative as in boolean (not) or as in numbers
(minus).
%End
%TypeHeaderCode
#include "qgsexpressionnodeimpl.h"
%End
public:
enum UnaryOperator /BaseType=IntEnum/
{
uoNot,
uoMinus,
};
QgsExpressionNodeUnaryOperator( QgsExpressionNodeUnaryOperator::UnaryOperator op, QgsExpressionNode *operand /Transfer/ );
%Docstring
A node unary operator is modifying the value of ``operand`` by negating
it with ``op``.
%End
~QgsExpressionNodeUnaryOperator();
SIP_PYOBJECT __repr__();
%MethodCode
QString str = QStringLiteral( "<QgsExpressionNodeUnaryOperator: %1>" ).arg( sipCpp->text() );
sipRes = PyUnicode_FromString( str.toUtf8().constData() );
%End
QgsExpressionNodeUnaryOperator::UnaryOperator op() const;
%Docstring
Returns the unary operator.
%End
QgsExpressionNode *operand() const;
%Docstring
Returns the node the operator will operate upon.
%End
virtual QgsExpressionNode::NodeType nodeType() const;
virtual bool prepareNode( QgsExpression *parent, const QgsExpressionContext *context );
virtual QVariant evalNode( QgsExpression *parent, const QgsExpressionContext *context );
virtual QString dump() const;
virtual QSet<QString> referencedColumns() const;
virtual QSet<QString> referencedVariables() const;
virtual QSet<QString> referencedFunctions() const;
virtual QgsExpressionNode *clone() const /Factory/;
virtual bool isStatic( QgsExpression *parent, const QgsExpressionContext *context ) const;
QString text() const;
%Docstring
Returns a the name of this operator without the operands. I.e. "NOT" or
"-"
%End
};
class QgsExpressionNodeBinaryOperator : QgsExpressionNode
{
%Docstring(signature="appended")
A binary expression operator, which operates on two values.
%End
%TypeHeaderCode
#include "qgsexpressionnodeimpl.h"
%End
public:
enum BinaryOperator /BaseType=IntEnum/
{
// logical
boOr,
boAnd,
// comparison
boEQ,
boNE,
boLE,
boGE,
boLT,
boGT,
boRegexp,
boLike,
boNotLike,
boILike,
boNotILike,
boIs,
boIsNot,
// math
boPlus,
boMinus,
boMul,
boDiv,
boIntDiv,
boMod,
boPow,
// strings
boConcat,
};
QgsExpressionNodeBinaryOperator( QgsExpressionNodeBinaryOperator::BinaryOperator op, QgsExpressionNode *opLeft /Transfer/, QgsExpressionNode *opRight /Transfer/ );
%Docstring
Binary combination of the left and the right with op.
%End
~QgsExpressionNodeBinaryOperator();
SIP_PYOBJECT __repr__();
%MethodCode
QString str = QStringLiteral( "<QgsExpressionNodeBinaryOperator: %1>" ).arg( sipCpp->text() );
sipRes = PyUnicode_FromString( str.toUtf8().constData() );
%End
QgsExpressionNodeBinaryOperator::BinaryOperator op() const;
%Docstring
Returns the binary operator.
%End
QgsExpressionNode *opLeft() const;
%Docstring
Returns the node to the left of the operator.
.. seealso:: :py:func:`opRight`
%End
QgsExpressionNode *opRight() const;
%Docstring
Returns the node to the right of the operator.
.. seealso:: :py:func:`opLeft`
%End
virtual QgsExpressionNode::NodeType nodeType() const;
virtual bool prepareNode( QgsExpression *parent, const QgsExpressionContext *context );
virtual QVariant evalNode( QgsExpression *parent, const QgsExpressionContext *context );
virtual QString dump() const;
virtual QSet<QString> referencedColumns() const;
virtual QSet<QString> referencedVariables() const;
virtual QSet<QString> referencedFunctions() const;
virtual bool needsGeometry() const;
virtual QgsExpressionNode *clone() const /Factory/;
virtual bool isStatic( QgsExpression *parent, const QgsExpressionContext *context ) const;
int precedence() const;
%Docstring
Returns the precedence index for the operator. Higher values have higher
precedence.
%End
bool leftAssociative() const;
%Docstring
Returns ``True`` if the operator is left-associative.
%End
QString text() const;
%Docstring
Returns a the name of this operator without the operands. I.e. "AND",
"OR", ...
%End
};
class QgsExpressionNodeIndexOperator : QgsExpressionNode
{
%Docstring(signature="appended")
A indexing expression operator, which allows use of square brackets []
to reference map and array items.
.. versionadded:: 3.6
%End
%TypeHeaderCode
#include "qgsexpressionnodeimpl.h"
%End
public:
QgsExpressionNodeIndexOperator( QgsExpressionNode *container /Transfer/, QgsExpressionNode *index /Transfer/ );
%Docstring
Constructor for QgsExpressionNodeIndexOperator.
%End
~QgsExpressionNodeIndexOperator();
QgsExpressionNode *container() const;
%Docstring
Returns the container node, representing an array or map value.
.. seealso:: :py:func:`index`
%End
QgsExpressionNode *index() const;
%Docstring
Returns the index node, representing an array element index or map key.
.. seealso:: :py:func:`container`
%End
virtual QgsExpressionNode::NodeType nodeType() const;
virtual bool prepareNode( QgsExpression *parent, const QgsExpressionContext *context );
virtual QVariant evalNode( QgsExpression *parent, const QgsExpressionContext *context );
virtual QString dump() const;
virtual QSet<QString> referencedColumns() const;
virtual QSet<QString> referencedVariables() const;
virtual QSet<QString> referencedFunctions() const;
virtual bool needsGeometry() const;
virtual QgsExpressionNode *clone() const /Factory/;
virtual bool isStatic( QgsExpression *parent, const QgsExpressionContext *context ) const;
};
class QgsExpressionNodeBetweenOperator: QgsExpressionNode
{
%Docstring(signature="appended")
SQL-like BETWEEN and NOT BETWEEN predicates.
.. versionadded:: 3.26
%End
%TypeHeaderCode
#include "qgsexpressionnodeimpl.h"
%End
public:
QgsExpressionNodeBetweenOperator( QgsExpressionNode *node /Transfer/, QgsExpressionNode *nodeLowerBound /Transfer/, QgsExpressionNode *nodeHigherBound /Transfer/, bool negate = false );
%Docstring
This node tests if the result of ``node`` is between the result of
``nodeLowerBound`` and ``nodeHigherBound`` nodes. Optionally it can be
inverted with ``negate`` which by default is ``False``.
%End
~QgsExpressionNodeBetweenOperator();
QgsExpressionNode *node() const;
%Docstring
Returns the expression node.
%End
virtual QgsExpressionNode::NodeType nodeType() const;
virtual bool prepareNode( QgsExpression *parent, const QgsExpressionContext *context );
virtual QVariant evalNode( QgsExpression *parent, const QgsExpressionContext *context );
virtual QString dump() const;
virtual QSet<QString> referencedColumns() const;
virtual QSet<QString> referencedVariables() const;
virtual QSet<QString> referencedFunctions() const;
virtual QgsExpressionNode *clone() const /Factory/;
virtual bool isStatic( QgsExpression *parent, const QgsExpressionContext *context ) const;
QgsExpressionNode *lowerBound() const;
%Docstring
Returns the lower bound expression node of the range.
%End
QgsExpressionNode *higherBound() const;
%Docstring
Returns the higher bound expression node of the range.
%End
bool negate() const;
%Docstring
Returns ``True`` if the predicate is an exclusion test (NOT BETWEEN).
%End
};
class QgsExpressionNodeInOperator : QgsExpressionNode
{
%Docstring(signature="appended")
An expression node for value IN or NOT IN clauses.
%End
%TypeHeaderCode
#include "qgsexpressionnodeimpl.h"
%End
public:
QgsExpressionNodeInOperator( QgsExpressionNode *node /Transfer/, QgsExpressionNode::NodeList *list /Transfer/, bool notin = false );
%Docstring
This node tests if the result of ``node`` is in the result of ``list``.
Optionally it can be inverted with ``notin`` which by default is
``False``.
%End
~QgsExpressionNodeInOperator();
QgsExpressionNode *node() const;
%Docstring
Returns the expression node.
%End
bool isNotIn() const;
%Docstring
Returns ``True`` if this node is a "NOT IN" operator, or ``False`` if
the node is a normal "IN" operator.
%End
QgsExpressionNode::NodeList *list() const;
%Docstring
Returns the list of nodes to search for matching values within.
%End
virtual QgsExpressionNode::NodeType nodeType() const;
virtual bool prepareNode( QgsExpression *parent, const QgsExpressionContext *context );
virtual QVariant evalNode( QgsExpression *parent, const QgsExpressionContext *context );
virtual QString dump() const;
virtual QSet<QString> referencedColumns() const;
virtual QSet<QString> referencedVariables() const;
virtual QSet<QString> referencedFunctions() const;
virtual QgsExpressionNode *clone() const /Factory/;
virtual bool isStatic( QgsExpression *parent, const QgsExpressionContext *context ) const;
};
class QgsExpressionNodeFunction : QgsExpressionNode
{
%Docstring(signature="appended")
An expression node for expression functions.
%End
%TypeHeaderCode
#include "qgsexpressionnodeimpl.h"
%End
public:
QgsExpressionNodeFunction( int fnIndex, QgsExpressionNode::NodeList *args /Transfer/ );
%Docstring
A function node consists of an index of the function in the global
function array and a list of arguments that will be passed to it.
%End
~QgsExpressionNodeFunction();
SIP_PYOBJECT __repr__();
%MethodCode
QString function;
if ( QgsExpressionFunction *fd = QgsExpression::QgsExpression::Functions()[sipCpp->fnIndex()] )
{
function = fd->name();
}
else
{
function = QString::number( sipCpp->fnIndex() );
}
QString str = QStringLiteral( "<QgsExpressionNodeFunction: %1>" ).arg( function );
sipRes = PyUnicode_FromString( str.toUtf8().constData() );
%End
int fnIndex() const;
%Docstring
Returns the index of the node's function.
%End
QgsExpressionNode::NodeList *args() const;
%Docstring
Returns a list of arguments specified for the function.
%End
virtual QgsExpressionNode::NodeType nodeType() const;
virtual bool prepareNode( QgsExpression *parent, const QgsExpressionContext *context );
virtual QVariant evalNode( QgsExpression *parent, const QgsExpressionContext *context );
virtual QString dump() const;
virtual QSet<QString> referencedColumns() const;
virtual QSet<QString> referencedVariables() const;
virtual QSet<QString> referencedFunctions() const;
virtual QgsExpressionNode *clone() const /Factory/;
virtual bool isStatic( QgsExpression *parent, const QgsExpressionContext *context ) const;
static bool validateParams( int fnIndex, QgsExpressionNode::NodeList *args, QString &error );
%Docstring
Tests whether the provided argument list is valid for the matching
function
%End
};
class QgsExpressionNodeLiteral : QgsExpressionNode
{
%Docstring(signature="appended")
An expression node for literal values.
%End
%TypeHeaderCode
#include "qgsexpressionnodeimpl.h"
%End
public:
QgsExpressionNodeLiteral( const QVariant &value );
%Docstring
Constructor for QgsExpressionNodeLiteral, with the specified literal
``value``.
%End
SIP_PYOBJECT __repr__();
%MethodCode
QString str = QStringLiteral( "<QgsExpressionNodeLiteral: %1>" ).arg( sipCpp->valueAsString() );
sipRes = PyUnicode_FromString( str.toUtf8().constData() );
%End
QVariant value() const;
%Docstring
The value of the literal.
%End
virtual QgsExpressionNode::NodeType nodeType() const;
virtual bool prepareNode( QgsExpression *parent, const QgsExpressionContext *context );
virtual QVariant evalNode( QgsExpression *parent, const QgsExpressionContext *context );
virtual QString dump() const;
virtual QSet<QString> referencedColumns() const;
virtual QSet<QString> referencedVariables() const;
virtual QSet<QString> referencedFunctions() const;
virtual QgsExpressionNode *clone() const /Factory/;
virtual bool isStatic( QgsExpression *parent, const QgsExpressionContext *context ) const;
QString valueAsString() const;
%Docstring
Returns a string representation of the node's literal value.
.. versionadded:: 3.20
%End
};
class QgsExpressionNodeColumnRef : QgsExpressionNode
{
%Docstring(signature="appended")
An expression node which takes it value from a feature's field.
%End
%TypeHeaderCode
#include "qgsexpressionnodeimpl.h"
%End
public:
QgsExpressionNodeColumnRef( const QString &name );
%Docstring
Constructor for QgsExpressionNodeColumnRef, referencing the column with
the specified ``name``.
%End
SIP_PYOBJECT __repr__();
%MethodCode
QString str = QStringLiteral( "<QgsExpressionNodeColumnRef: \"%1\">" ).arg( sipCpp->name() );
sipRes = PyUnicode_FromString( str.toUtf8().constData() );
%End
QString name() const;
%Docstring
The name of the column.
%End
virtual QgsExpressionNode::NodeType nodeType() const;
virtual bool prepareNode( QgsExpression *parent, const QgsExpressionContext *context );
virtual QVariant evalNode( QgsExpression *parent, const QgsExpressionContext *context );
virtual QString dump() const;
virtual QSet<QString> referencedColumns() const;
virtual QSet<QString> referencedVariables() const;
virtual QSet<QString> referencedFunctions() const;
virtual bool needsGeometry() const;
virtual QgsExpressionNode *clone() const /Factory/;
virtual bool isStatic( QgsExpression *parent, const QgsExpressionContext *context ) const;
};
class QgsExpressionNodeCondition : QgsExpressionNode
{
%Docstring(signature="appended")
An expression node for CASE WHEN clauses.
%End
%TypeHeaderCode
#include "qgsexpressionnodeimpl.h"
%End
public:
class WhenThen
{
%Docstring(signature="appended")
Represents a "WHEN... THEN..." portation of a CASE WHEN clause in an
expression.
%End
%TypeHeaderCode
#include "qgsexpressionnodeimpl.h"
%End
public:
WhenThen( QgsExpressionNode *whenExp, QgsExpressionNode *thenExp );
%Docstring
A combination of when and then. Simple as that.
%End
~WhenThen();
QgsExpressionNodeCondition::WhenThen *clone() const /Factory/;
%Docstring
Gets a deep copy of this WhenThen combination.
%End
QgsExpressionNode *whenExp() const;
%Docstring
The expression that makes the WHEN part of the condition.
:return: The expression node that makes the WHEN part of the condition
check.
%End
QgsExpressionNode *thenExp() const;
%Docstring
The expression node that makes the THEN result part of the condition.
:return: The expression node that makes the THEN result part of the
condition.
%End
private:
WhenThen( const QgsExpressionNodeCondition::WhenThen &rh );
};
typedef QList<QgsExpressionNodeCondition::WhenThen *> WhenThenList;
QgsExpressionNodeCondition( QgsExpressionNodeCondition::WhenThenList *conditions, QgsExpressionNode *elseExp = 0 );
%Docstring
Create a new node with the given list of ``conditions`` and an optional
``elseExp`` expression.
%End
~QgsExpressionNodeCondition();
virtual QgsExpressionNode::NodeType nodeType() const;
virtual QVariant evalNode( QgsExpression *parent, const QgsExpressionContext *context );
virtual bool prepareNode( QgsExpression *parent, const QgsExpressionContext *context );
virtual QString dump() const;
WhenThenList conditions() const;
%Docstring
The list of WHEN THEN expression parts of the expression.
:return: The list of WHEN THEN expression parts of the expression.
%End
QgsExpressionNode *elseExp() const;
%Docstring
The ELSE expression used for the condition.
:return: The ELSE expression used for the condition.
%End
virtual QSet<QString> referencedColumns() const;
virtual QSet<QString> referencedVariables() const;
virtual QSet<QString> referencedFunctions() const;
virtual bool needsGeometry() const;
virtual QgsExpressionNode *clone() const /Factory/;
virtual bool isStatic( QgsExpression *parent, const QgsExpressionContext *context ) const;
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/expression/qgsexpressionnodeimpl.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|