Qt 4.8
|
Casts every item in a sequence obtained from evaluating an Expression, to a requested atomic type. More...
#include <quntypedatomicconverter_p.h>
Private Types | |
typedef QExplicitlySharedDataPointer< const UntypedAtomicConverter > | ConstPtr |
Properties | |
const ItemType::Ptr | m_reqType |
Casts every item in a sequence obtained from evaluating an Expression, to a requested atomic type.
The atomic values it casts from are instances of xs:untypedAtomic(hence the name). Typically, the items are from an Atomizer. UntypedAtomicConverter implements the automatic conversion which typically is activated when XPath is handling untyped data.
Definition at line 80 of file quntypedatomicconverter_p.h.
|
private |
Definition at line 113 of file quntypedatomicconverter_p.h.
UntypedAtomicConverter::UntypedAtomicConverter | ( | const Expression::Ptr & | operand, |
const ItemType::Ptr & | reqType, | ||
const ReportContext::ErrorCode | code = ReportContext::FORG0001 |
||
) |
Definition at line 53 of file quntypedatomicconverter.cpp.
|
virtual |
Implements QPatternist::Expression.
Reimplemented in QPatternist::ArgumentConverter.
Definition at line 103 of file quntypedatomicconverter.cpp.
|
virtual |
Returns this
.
Reimplemented from QPatternist::Expression.
Definition at line 108 of file quntypedatomicconverter.cpp.
Referenced by targetType().
|
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.
Reimplemented in QPatternist::ArgumentConverter.
Definition at line 62 of file quntypedatomicconverter.cpp.
|
virtual |
Reimplemented from QPatternist::Expression.
Reimplemented in QPatternist::ArgumentConverter.
Definition at line 69 of file quntypedatomicconverter.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.
Reimplemented in QPatternist::ArgumentConverter.
Definition at line 90 of file quntypedatomicconverter.cpp.
|
inline |
Definition at line 117 of file quntypedatomicconverter_p.h.
Referenced by QPatternist::ArgumentConverter::evaluateSingleton().
|
virtual |
Implements QPatternist::Expression.
Reimplemented in QPatternist::ArgumentConverter.
Definition at line 97 of file quntypedatomicconverter.cpp.
|
inline |
Definition at line 105 of file quntypedatomicconverter_p.h.
|
virtual |
Overridden to call CastingPlatform::typeCheck()
Reimplemented from QPatternist::Expression.
Definition at line 79 of file quntypedatomicconverter.cpp.
|
private |
Definition at line 114 of file quntypedatomicconverter_p.h.
Referenced by staticType(), and targetType().