Implements the function fn:distinct-values()
.
More...
#include <qsequencefns_p.h>
|
AtomicComparator::Operator | operatorID () const |
|
template<CardinalityComputation suppliedCard> |
SequenceType::Ptr | operandsUnionType () const |
|
void | typeCheckOperands (const StaticContext::Ptr &context) |
|
| CppCastingHelper () |
|
const AtomicComparator::Ptr & | comparator () const |
|
bool | compare (const Item &i1, const Item &i2, const AtomicComparator::Ptr &comp, const AtomicComparator::Operator op) const |
| Compares i1 and i2 with operator op , using comparator comp . All input arguments must be valid, and not null . More...
|
|
| ComparisonPlatform () |
|
AtomicComparator::ComparisonResult | detailedFlexibleCompare (const Item &it1, const Item &it2, const DynamicContext::Ptr &context) const |
| like flexibleCompare(), but returns the result as an AtomicComparator::Operator instead of bool . More...
|
|
AtomicComparator::Ptr | fetchComparator (const ItemType::Ptr &type1, const ItemType::Ptr &type2, const ReportContext::Ptr &context) const |
|
bool | flexibleCompare (const Item &it1, const Item &it2, const DynamicContext::Ptr &context) const |
| Compares it1 against it2 , using comparator() and operatorID(). More...
|
|
void | prepareComparison (const AtomicComparator::Ptr &comparator) |
|
void | useCaseInsensitiveComparator () |
|
|
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 |
|
Expression::List | m_operands |
|
Implements the function fn:distinct-values()
.
- Author
- Frans Englich frans.nosp@m..eng.nosp@m.lich@.nosp@m.noki.nosp@m.a.com
Definition at line 190 of file qsequencefns_p.h.
◆ DistinctValuesFN()
QPatternist::DistinctValuesFN::DistinctValuesFN |
( |
| ) |
|
|
inline |
◆ 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 100 of file qsequencefns.cpp.
Expression::List m_operands
Filters another sequence by removing duplicates such that the items are unique.
QExplicitlySharedDataPointer< const Expression > ConstPtr
A smart pointer wrapping const Expression instances.
QExplicitlySharedDataPointer< QAbstractXmlForwardIterator< Item > > Ptr
A smart pointer wrapping an instance of a QAbstractXmlForwardIterator subclass.
T & first()
Returns a reference to the first item in the list.
virtual Item::Iterator::Ptr evaluateSequence(const DynamicContext::Ptr &context) const
◆ operatorID()
◆ staticType()
- Returns
- a type whose item type is the type of the first operand, and a cardinality which is non-empty if the first operand's type is non-empty and allows exactly-one. The latter is needed for operands which has the cardinality 2+, since distinct-values possibly removes items from the source sequence.
Reimplemented from QPatternist::FunctionCall.
Definition at line 127 of file qsequencefns.cpp.
130 return makeGenericSequenceType(t->itemType(),
Expression::List m_operands
static Cardinality oneOrMore()
T & first()
Returns a reference to the first item in the list.
virtual SequenceType::Ptr staticType() const =0
Represents a cardinality, a possible , often represented by occurrence indicators.
◆ typeCheck()
Performs necessary type checks, but also implements the optimization of rewriting to its operand if the operand's cardinality is zero-or-one or exactly-one.
Reimplemented from QPatternist::FunctionCall.
Definition at line 108 of file qsequencefns.cpp.
virtual Expression::Ptr typeCheck(const StaticContext::Ptr &context, const SequenceType::Ptr &reqType)
Expression::List m_operands
static Expression::Ptr create(const Expression *const replacementFor, const StaticContext::Ptr &context)
Creates an EmptySequence that is a replacement for replacementFor.
virtual Cardinality cardinality() const =0
T & first()
Returns a reference to the first item in the list.
virtual SequenceType::Ptr staticType() const =0
static const EmptySequenceType::Ptr Empty
static const AtomicType::Ptr xsAnyAtomicType
virtual ItemType::Ptr itemType() const =0
The documentation for this class was generated from the following files: