Qt 4.8
|
Implements XPath 2.0's to
expression.
More...
#include <qrangeexpression_p.h>
Implements XPath 2.0's to
expression.
Despite its name, RangeExpression is not related to RangeVariableDeclaration.
Definition at line 75 of file qrangeexpression_p.h.
RangeExpression::RangeExpression | ( | const Expression::Ptr & | operand1, |
const Expression::Ptr & | operand2 | ||
) |
Definition at line 56 of file qrangeexpression.cpp.
|
virtual |
Implements QPatternist::Expression.
Definition at line 165 of file qrangeexpression.cpp.
|
virtual |
Evaluate this Expression by iterating over it. This is a central function for evaluating expressions.
Expressions must always always return a valid QAbstractXmlForwardIterator and may never return 0. If an empty result is of interest to be returned, the EmptyIterator should be returned.
The default implementation returns a SingletonIterator over the item returned from evaluateSingleton().
Reimplemented from QPatternist::Expression.
Definition at line 61 of file qrangeexpression.cpp.
|
virtual |
It's likely that this function gets called if staticType() inferred the cardinality to an exact number. In that case, we know that the first arguments is the same as the second argument.
Reimplemented from QPatternist::Expression.
Definition at line 83 of file qrangeexpression.cpp.
|
virtual |
Returns a list of Sequence Types, describing the type of each of the expression's operands. Hence, this function has a relationship to the operands() function:
- The lengths of the lists returned by expectedOperandTypes() and operands() should always be equal in length, since one cannot describe the type of a non-existent operand(and all operands must have type information). - A significant difference between the two functions is that while the type of objects in the list returned by operands() may vary between compilations/static context, simply because the particular Expression is part of different XPath expressions, the types in the list returned by expectedOperandTypes is always the same since the function/operator signature never changes.
This function should not be confused with staticType(), which returns the static type of the expression itself, not its operands. The function call is an expression where this is clear: the type of the return value is not the same as the arguments' types. The static type of the operands supplied to the expression can be determined via the staticType() function of the instances returned by operands().
If the expression has no operands, an empty list should be returned.
Implements QPatternist::Expression.
Definition at line 88 of file qrangeexpression.cpp.
|
virtual |
Disables compression for optimization reasons. For example, the expression "1 to 1000" would consume thousand allocated instances of Integer, and RangeIterator is well suited for dynamic evaluation.
Reimplemented from QPatternist::Expression.
Definition at line 160 of file qrangeexpression.cpp.
|
virtual |
Implements QPatternist::Expression.
Definition at line 96 of file qrangeexpression.cpp.