Implements the function fn:insert-before()
.
More...
#include <qsequencefns_p.h>
|
typedef QExplicitlySharedDataPointer< FunctionCall > | Ptr |
|
enum | CardinalityComputation { ProductOfCardinality,
UnionOfCardinality
} |
|
typedef QExplicitlySharedDataPointer< const Expression > | ConstPtr |
| A smart pointer wrapping const Expression instances. More...
|
|
enum | ID {
IDBooleanValue = 1,
IDCountFN,
IDEmptyFN,
IDExistsFN,
IDExpressionSequence,
IDGeneralComparison,
IDIfThenClause,
IDIgnorableExpression,
IDIntegerValue,
IDPositionFN,
IDStringValue,
IDValueComparison,
IDRangeVariableReference,
IDContextItem,
IDUserFunctionCallsite,
IDExpressionVariableReference,
IDAttributeConstructor,
IDUpperCaseFN,
IDLowerCaseFN,
IDFirstItemPredicate,
IDEmptySequence,
IDReturnOrderBy,
IDLetClause,
IDForClause,
IDPath,
IDNamespaceConstructor,
IDArgumentReference,
IDGenericPredicate,
IDAxisStep,
IDFloat,
IDCombineNodes,
IDUnresolvedVariableReference,
IDCardinalityVerifier
} |
|
typedef QList< Expression::Ptr > | List |
|
typedef QFlags< Property > | Properties |
|
enum | Property {
UseContextItem = 1,
DisableElimination = 1 << 1,
IsEvaluated = 1 << 2,
DisableTypingDeduction = 1 << 3,
EmptynessFollowsChild = 1 << 4,
RewriteToEmptyOnEmpty = 1 << 5,
RequiresFocus = 1 << 6,
AffectsOrderOnly = 1 << 7,
RequiresContextItem = (1 << 8) | RequiresFocus,
CreatesFocusForLast = 1 << 9,
LastOperandIsCollation = 1 << 10,
DependsOnLocalVariable = (1 << 11) | DisableElimination,
EvaluationCacheRedundant = (1 << 12),
IsNodeConstructor = 1 << 13,
RequiresCurrentItem = 1 << 14
} |
|
typedef QExplicitlySharedDataPointer< Expression > | Ptr |
| A smart pointer wrapping mutable Expression instances. More...
|
|
typedef ::QAbstractXmlForwardIterator< Expression::Ptr > | QAbstractXmlForwardIterator |
|
typedef QVector< Expression::Ptr > | Vector |
|
static void | rewrite (Expression::Ptr &old, const Expression::Ptr &New, const StaticContext::Ptr &context) |
|
QAtomicInt | ref |
|
template<CardinalityComputation suppliedCard> |
SequenceType::Ptr | operandsUnionType () const |
|
void | typeCheckOperands (const StaticContext::Ptr &context) |
|
| CppCastingHelper () |
|
Expression::List | m_operands |
|
Implements the function fn:insert-before()
.
- Author
- Frans Englich frans.nosp@m..eng.nosp@m.lich@.nosp@m.noki.nosp@m.a.com
Definition at line 230 of file qsequencefns_p.h.
◆ evaluateSequence()
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().
- Note
- This function may raise an exception when calling, not only when QAbstractXmlForwardIterator::next() is called on the return value. This is because in some cases evaluateSingleton() is called directly.
Reimplemented from QPatternist::Expression.
Definition at line 135 of file qsequencefns.cpp.
Expression::List m_operands
static qreal position(QGraphicsObject *item, QDeclarativeAnchorLine::AnchorLine anchorLine)
The QExplicitlySharedDataPointer class represents a pointer to an explicitly shared object...
QExplicitlySharedDataPointer< QAbstractXmlForwardIterator< Item > > Ptr
A smart pointer wrapping an instance of a QAbstractXmlForwardIterator subclass.
const T & at(int i) const
Returns the item at index position i in the list.
T & first()
Returns a reference to the first item in the list.
Conceptually inserts one QAbstractXmlForwardIterator into another, make two QAbstractXmlForwardIterat...
Base class for all numeric values.
virtual Item evaluateSingleton(const DynamicContext::Ptr &context) const
virtual Item::Iterator::Ptr evaluateSequence(const DynamicContext::Ptr &context) const
◆ evaluateSingleton()
◆ staticType()
Implements the static enferences rules. The function's static item type is the union type of the first and third argument, and the cardinality is the cardinalities of the two operands added together. For example, insert-before((1, "str"), 1, xs:double(0)) has the static type xs:anyAtomicType+.
- See also
- XQuery 1.0 and XPath 2.0 Formal Semantics, 7.2.15 The fn:insert-before function
Reimplemented from QPatternist::FunctionCall.
Definition at line 153 of file qsequencefns.cpp.
158 return makeGenericSequenceType(t1->itemType() | t2->itemType(),
159 t1->cardinality() + t2->cardinality());
Expression::List m_operands
T & first()
Returns a reference to the first item in the list.
virtual SequenceType::Ptr staticType() const =0
T & last()
Returns a reference to the last item in the list.
The documentation for this class was generated from the following files: