Qt 4.8
|
Implements XPath 2.0's quantification expressions some
and every
.
More...
#include <qquantifiedexpression_p.h>
Static Public Functions | |
static QString | displayName (const Operator quantifier) |
Static Public Functions inherited from QPatternist::Expression | |
static void | rewrite (Expression::Ptr &old, const Expression::Ptr &New, const StaticContext::Ptr &context) |
Private Types | |
typedef QExplicitlySharedDataPointer< const QuantifiedExpression > | ConstPtr |
Properties | |
const Operator | m_quantifier |
const VariableSlotID | m_varSlot |
Additional Inherited Members | |
Public Variables inherited from QSharedData | |
QAtomicInt | ref |
Protected Functions inherited from QPatternist::PairContainer | |
PairContainer (const Expression::Ptr &operand1, const Expression::Ptr &operand2) | |
Protected Functions inherited from QPatternist::Expression | |
void | typeCheckOperands (const StaticContext::Ptr &context) |
Protected Functions inherited from QPatternist::CppCastingHelper< Expression > | |
CppCastingHelper () | |
Protected Variables inherited from QPatternist::PairContainer | |
Expression::Ptr | m_operand1 |
Expression::Ptr | m_operand2 |
Implements XPath 2.0's quantification expressions some
and every
.
Definition at line 71 of file qquantifiedexpression_p.h.
|
private |
Definition at line 104 of file qquantifiedexpression_p.h.
QuantifiedExpression::QuantifiedExpression | ( | const VariableSlotID | varSlot, |
const Operator | quantifier, | ||
const Expression::Ptr & | inClause, | ||
const Expression::Ptr & | testExpression | ||
) |
Definition at line 52 of file qquantifiedexpression.cpp.
|
virtual |
Implements QPatternist::Expression.
Definition at line 135 of file qquantifiedexpression.cpp.
Determines the string representation for a quantification operator.
quantifier
is Some, or "every" if quantifier
is Every Definition at line 106 of file qquantifiedexpression.cpp.
|
virtual |
Determines the Effective Boolean Value of the expression.
The Effective Boolean Value of a value is not necessarily the same as converting the value to a new value of type xs:boolean.
Note that this function cannot return the empty sequence, evaluateSingleton() must be overridden in order to be able to do that.
The default implementation results in a type error. Hence, this function must be overridden if such behavior is not of interest.
Reimplemented from QPatternist::Expression.
Definition at line 70 of file qquantifiedexpression.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 122 of file qquantifiedexpression.cpp.
|
inline |
Definition at line 63 of file qquantifiedexpression.cpp.
QuantifiedExpression::Operator QuantifiedExpression::operatorID | ( | ) | const |
Definition at line 130 of file qquantifiedexpression.cpp.
|
virtual |
Implements QPatternist::Expression.
Definition at line 117 of file qquantifiedexpression.cpp.
|
private |
Definition at line 106 of file qquantifiedexpression_p.h.
Referenced by evaluateEBV(), and operatorID().
|
private |
Definition at line 105 of file qquantifiedexpression_p.h.
Referenced by mapToItem().