42 #include <QtAlgorithms> 62 , m_stability(stability)
63 , m_orderSpecs(aOrderSpecs)
64 , m_returnOrderBy(returnOrderBy)
74 prepareComparison(fetchComparator(t, t, context));
111 const int len = sortKeys1.
count();
112 Q_ASSERT(sortKeys1.count() == sortKeys2.count());
114 for(
int i = 0; i < len; ++i)
116 const Item &i1 = sortKeys1.at(i);
117 const Item &i2 = sortKeys2.at(i);
189 qSort(tuples.begin(), tuples.end(), sorter);
192 return makeSequenceMappingIterator<Item>(
ConstPtr(
this),
207 const int len = ops.
count();
211 for(
int i = 1; i < len; ++i)
258 return visitor->visit(
this);
static bool isNaN(const Item &i)
#define QT_END_NAMESPACE
This macro expands to.
Item::Iterator::Ptr mapToSequence(const Item &i, const DynamicContext::Ptr &context) const
const Stability m_stability
virtual Properties properties() const
static const SequenceType::Ptr ZeroOrMoreItems
int count(const T &t) const
Returns the number of occurrences of value in the vector.
Together with OrderBy, it implements XQuery 1.0's order by expression.
const DynamicContext::Ptr & m_context
QList< Expression::Ptr > List
ReturnOrderBy *const m_returnOrderBy
virtual Expression::Ptr typeCheck(const StaticContext::Ptr &context, const SequenceType::Ptr &reqType)
QAbstractXmlForwardIterator< T >::Ptr makeListIterator(const QList< T > &list)
int count(const T &t) const
Returns the number of occurrences of value in the list.
virtual Item::Iterator::Ptr evaluateSequence(const DynamicContext::Ptr &context) const
Functor used by Qt's qSort() and qStableSort(). Used for FLWOR's order by expression.
virtual Expression::Ptr compress(const StaticContext::Ptr &context)
void setStay(const bool a)
void append(const T &t)
Inserts value at the end of the list.
virtual SequenceType::List expectedOperandTypes() const
#define QT_BEGIN_NAMESPACE
This macro expands to.
virtual Expression::List operands() const
StaticContext::OrderingEmptySequence orderingEmptySequence
QExplicitlySharedDataPointer< const OrderBy > ConstPtr
OrderSpec::Vector m_orderSpecs
void prepare(const Expression::Ptr &source, const StaticContext::Ptr &context)
The namespace for the internal API of QtXmlPatterns.
static const AtomicType::Ptr xsDouble
virtual Cardinality cardinality() const =0
QExplicitlySharedDataPointer< ItemType > type() const
Returns the ItemType this Item is of.
void qSort(RandomAccessIterator start, RandomAccessIterator end)
virtual SequenceType::Ptr staticType() const
const T & at(int i) const
Returns the item at index position i in the vector.
void qStableSort(RandomAccessIterator start, RandomAccessIterator end)
Represents a value and its sort keys in FLOWR's order by clause.
virtual ExpressionVisitorResult::Ptr accept(const ExpressionVisitor::Ptr &visitor) const
virtual SequenceType::Ptr staticType() const =0
#define Q_ASSERT_X(cond, where, what)
Contains functions used for formatting arguments, such as keywords and paths, in translated strings...
Represents an item in the XPath 2.0 Data Model.
Base class for all numeric values.
OrderBy(const Stability stability, const OrderSpec::Vector &orderSpecs, const Expression::Ptr &operand, ReturnOrderBy *const returnOrderBy)
Contains class Numeric. This file was originally called qnumeric_p.h, but various build systems canno...
const Item::Vector & sortKeys() const
virtual Properties properties() const
virtual Expression::Ptr typeCheck(const StaticContext::Ptr &context, const SequenceType::Ptr &reqType)
virtual bool isNaN() const =0
Expression::Ptr m_operand
virtual Expression::Ptr compress(const StaticContext::Ptr &context)
bool isEmpty() const
Returns true if the vector has size 0; otherwise returns false.
The QFlags class provides a type-safe way of storing OR-combinations of enum values.
virtual ItemType::Ptr itemType() const =0
bool operator()(const Item &item1, const Item &item2) const
const OrderBy::OrderSpec::Vector & m_orderSpecs
qLess(const OrderBy::OrderSpec::Vector &orderspecs, const DynamicContext::Ptr &context)
virtual Item::Iterator::Ptr evaluateSequence(const DynamicContext::Ptr &context) const
Base class for expressions that has exactly one operand.