Qt 4.8
|
UntypedAtomicConverter for ArgumentReference, if needed. More...
#include <qargumentconverter_p.h>
Private Types | |
typedef QExplicitlySharedDataPointer< const ArgumentConverter > | ConstPtr |
UntypedAtomicConverter for ArgumentReference, if needed.
If an argument inside a user function has no type declared, its type is item()
. It's atomized type would be inferred to xs:anyAtomicType
, but that is not necessarily correct, since the actual value can be anything, nodes or atomic values.
This extremely dynamic case is handled by ArgumentConverter which is inserted for ArgumentReference that has the static type item()
, when atomic value are asked for. At runtime it atomizes/let values through appropriately.
Definition at line 79 of file qargumentconverter_p.h.
|
private |
Definition at line 94 of file qargumentconverter_p.h.
ArgumentConverter::ArgumentConverter | ( | const Expression::Ptr & | operand, |
const ItemType::Ptr & | reqType | ||
) |
Definition at line 51 of file qargumentconverter.cpp.
|
virtual |
Reimplemented from QPatternist::UntypedAtomicConverter.
Definition at line 56 of file qargumentconverter.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::UntypedAtomicConverter.
Definition at line 75 of file qargumentconverter.cpp.
|
virtual |
Reimplemented from QPatternist::UntypedAtomicConverter.
Definition at line 82 of file qargumentconverter.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.
Reimplemented from QPatternist::UntypedAtomicConverter.
Definition at line 92 of file qargumentconverter.cpp.
|
inline |
Definition at line 61 of file qargumentconverter.cpp.
|
virtual |
Reimplemented from QPatternist::UntypedAtomicConverter.
Definition at line 99 of file qargumentconverter.cpp.