Qt 4.8
Public Types | Public Functions | Properties | List of all members
QPatternist::SortTuple Class Reference

Represents a value and its sort keys in FLOWR's order by clause. More...

#include <qsorttuple_p.h>

Inheritance diagram for QPatternist::SortTuple:
QPatternist::AtomicValue QSharedData QPatternist::CppCastingHelper< AtomicValue >

Public Types

typedef QExplicitlySharedDataPointer< SortTuplePtr
 
- Public Types inherited from QPatternist::AtomicValue
typedef QList< AtomicValue::PtrList
 
typedef QExplicitlySharedDataPointer< AtomicValuePtr
 

Public Functions

virtual bool hasError () const
 Always asserts. More...
 
virtual bool isAtomicValue () const
 Always asserts. More...
 
virtual bool isNode () const
 Always asserts. More...
 
const Item::VectorsortKeys () const
 
 SortTuple (const Item::Iterator::Ptr &aValue, const Item::Vector &aSortKeys)
 
virtual QString stringValue () const
 
virtual ItemType::Ptr type () const
 
virtual Item::Iterator::Ptr typedValue () const
 Always asserts. More...
 
const Item::Iterator::Ptrvalue () const
 
- Public Functions inherited from QPatternist::AtomicValue
virtual bool evaluateEBV (const QExplicitlySharedDataPointer< DynamicContext > &context) const
 
virtual ~AtomicValue ()
 
- Public Functions inherited from QSharedData
 QSharedData ()
 Constructs a QSharedData object with a reference count of 0. More...
 
 QSharedData (const QSharedData &)
 Constructs a QSharedData object with reference count 0. More...
 
- Public Functions inherited from QPatternist::CppCastingHelper< AtomicValue >
const TCastTarget * as () const
 
TCastTarget * as ()
 

Properties

const Item::Vector m_sortKeys
 
const Item::Iterator::Ptr m_value
 

Additional Inherited Members

- Static Public Functions inherited from QPatternist::AtomicValue
static ItemType::Ptr qtToXDMType (const QXmlItem &item)
 
static QVariant toQt (const AtomicValue *const value)
 
static QVariant toQt (const AtomicValue::Ptr &value)
 
static Item toXDM (const QVariant &value)
 
- Public Variables inherited from QSharedData
QAtomicInt ref
 
- Protected Functions inherited from QPatternist::AtomicValue
 AtomicValue ()
 
- Protected Functions inherited from QPatternist::CppCastingHelper< AtomicValue >
 CppCastingHelper ()
 

Detailed Description

Represents a value and its sort keys in FLOWR's order by clause.

SortTuple doesn't correspond to anything in the XPath Data Model and can therefore well be described as an exotic implementation detail. Most of its functions asserts because it makes no sense to call them.

SortTuple exclusively exists for use with the expressions OrderBy and ReturnOrderBy, and acts as a carrier between those two for sort keys and source values.

Author
Frans Englich frans.nosp@m..eng.nosp@m.lich@.nosp@m.noki.nosp@m.a.com

Definition at line 81 of file qsorttuple_p.h.

Typedefs

◆ Ptr

A smart pointer wrapping SortTuple instances.

Definition at line 98 of file qsorttuple_p.h.

Constructors and Destructors

◆ SortTuple()

QPatternist::SortTuple::SortTuple ( const Item::Iterator::Ptr aValue,
const Item::Vector aSortKeys 
)
inline

aSortKeys may be empty.

Definition at line 87 of file qsorttuple_p.h.

88  : m_sortKeys(aSortKeys),
89  m_value(aValue)
90  {
93  }
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
const Item::Vector m_sortKeys
Definition: qsorttuple_p.h:139
bool isEmpty() const
Returns true if the vector has size 0; otherwise returns false.
Definition: qvector.h:139
const Item::Iterator::Ptr m_value
Definition: qsorttuple_p.h:140

Functions

◆ hasError()

bool SortTuple::hasError ( ) const
virtual

Always asserts.

Reimplemented from QPatternist::AtomicValue.

Definition at line 70 of file qsorttuple.cpp.

71 {
72  Q_ASSERT_X(false, Q_FUNC_INFO,
73  "It makes no sense to call this function.");
74  return false;
75 }
#define Q_ASSERT_X(cond, where, what)
Definition: qglobal.h:1837
#define Q_FUNC_INFO
Definition: qglobal.h:1871

◆ isAtomicValue()

bool SortTuple::isAtomicValue ( ) const
virtual

Always asserts.

Definition at line 51 of file qsorttuple.cpp.

52 {
53  Q_ASSERT_X(false, Q_FUNC_INFO,
54  "It makes no sense to call this function.");
55  return false;
56 }
#define Q_ASSERT_X(cond, where, what)
Definition: qglobal.h:1837
#define Q_FUNC_INFO
Definition: qglobal.h:1871

◆ isNode()

bool SortTuple::isNode ( ) const
virtual

Always asserts.

Definition at line 63 of file qsorttuple.cpp.

64 {
65  Q_ASSERT_X(false, Q_FUNC_INFO,
66  "It makes no sense to call this function.");
67  return false;
68 }
#define Q_ASSERT_X(cond, where, what)
Definition: qglobal.h:1837
#define Q_FUNC_INFO
Definition: qglobal.h:1871

◆ sortKeys()

const Item::Vector& QPatternist::SortTuple::sortKeys ( ) const
inline

Definition at line 128 of file qsorttuple_p.h.

Referenced by qLess< Item::List >::operator()().

129  {
130  return m_sortKeys;
131  }
const Item::Vector m_sortKeys
Definition: qsorttuple_p.h:139

◆ stringValue()

QString SortTuple::stringValue ( ) const
virtual

This function is sometimes called by Literal::description(). This function simply returns "SortTuple".

Implements QPatternist::AtomicValue.

Definition at line 58 of file qsorttuple.cpp.

59 {
60  return QLatin1String("SortTuple");
61 }
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString

◆ type()

ItemType::Ptr SortTuple::type ( ) const
virtual

Implements QPatternist::AtomicValue.

Definition at line 84 of file qsorttuple.cpp.

85 {
87 }
static const AtomicType::Ptr xsAnyAtomicType

◆ typedValue()

Item::Iterator::Ptr SortTuple::typedValue ( ) const
virtual

Always asserts.

Definition at line 77 of file qsorttuple.cpp.

78 {
79  Q_ASSERT_X(false, Q_FUNC_INFO,
80  "It makes no sense to call this function.");
81  return Item::Iterator::Ptr();
82 }
QExplicitlySharedDataPointer< QAbstractXmlForwardIterator< Item > > Ptr
A smart pointer wrapping an instance of a QAbstractXmlForwardIterator subclass.
#define Q_ASSERT_X(cond, where, what)
Definition: qglobal.h:1837
#define Q_FUNC_INFO
Definition: qglobal.h:1871

◆ value()

const Item::Iterator::Ptr& QPatternist::SortTuple::value ( ) const
inline

Definition at line 133 of file qsorttuple_p.h.

134  {
135  return m_value;
136  }
const Item::Iterator::Ptr m_value
Definition: qsorttuple_p.h:140

Properties

◆ m_sortKeys

const Item::Vector QPatternist::SortTuple::m_sortKeys
private

Definition at line 139 of file qsorttuple_p.h.

Referenced by sortKeys(), and SortTuple().

◆ m_value

const Item::Iterator::Ptr QPatternist::SortTuple::m_value
private

Definition at line 140 of file qsorttuple_p.h.

Referenced by SortTuple(), and value().


The documentation for this class was generated from the following files: