Qt 4.8
Public Types | Public Functions | Public Variables | Properties | List of all members
QPatternist::OrderBy::OrderSpec Class Reference

#include <qorderby_p.h>

Inheritance diagram for QPatternist::OrderBy::OrderSpec:
QPatternist::ComparisonPlatform< OrderBy::OrderSpec, true, AtomicComparator::AsValueComparison >

Public Types

enum  Direction { Ascending, Descending }
 
typedef QVector< OrderSpecVector
 

Public Functions

const SourceLocationReflectionactualReflection () const
 
AtomicComparator::Operator operatorID () const
 
 OrderSpec ()
 Default constructor, which is needed by QVector. More...
 
 OrderSpec (const Direction dir, const StaticContext::OrderingEmptySequence orderingEmpty)
 
void prepare (const Expression::Ptr &source, const StaticContext::Ptr &context)
 

Public Variables

Direction direction
 
StaticContext::OrderingEmptySequence orderingEmptySequence
 

Properties

Expression::Ptr m_expr
 

Additional Inherited Members

- Protected Functions inherited from QPatternist::ComparisonPlatform< OrderBy::OrderSpec, true, AtomicComparator::AsValueComparison >
const AtomicComparator::Ptrcomparator () 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 ()
 

Detailed Description

This class is value based.

Definition at line 88 of file qorderby_p.h.

Typedefs

◆ Vector

Definition at line 98 of file qorderby_p.h.

Enumerations

◆ Direction

Enumerator
Ascending 
Descending 

Definition at line 100 of file qorderby_p.h.

Constructors and Destructors

◆ OrderSpec() [1/2]

QPatternist::OrderBy::OrderSpec::OrderSpec ( )
inline

Default constructor, which is needed by QVector.

Definition at line 109 of file qorderby_p.h.

110  {
111  }

◆ OrderSpec() [2/2]

QPatternist::OrderBy::OrderSpec::OrderSpec ( const Direction  dir,
const StaticContext::OrderingEmptySequence  orderingEmpty 
)
inline

Definition at line 113 of file qorderby_p.h.

114  : direction(dir),
115  orderingEmptySequence(orderingEmpty)
116  {
117  }
StaticContext::OrderingEmptySequence orderingEmptySequence
Definition: qorderby_p.h:137

Functions

◆ actualReflection()

const SourceLocationReflection* QPatternist::OrderBy::OrderSpec::actualReflection ( ) const
inline

Definition at line 122 of file qorderby_p.h.

123  {
124  return m_expr.data();
125  }
T * data() const
Returns a pointer to the shared data object.
Definition: qshareddata.h:145

◆ operatorID()

AtomicComparator::Operator QPatternist::OrderBy::OrderSpec::operatorID ( ) const
inline

◆ prepare()

void OrderBy::OrderSpec::prepare ( const Expression::Ptr source,
const StaticContext::Ptr context 
)

Definition at line 69 of file qorderby.cpp.

Referenced by OrderSpec().

71 {
72  m_expr = source;
73  const ItemType::Ptr t(source->staticType()->itemType());
74  prepareComparison(fetchComparator(t, t, context));
75 }
AtomicComparator::Ptr fetchComparator(const ItemType::Ptr &type1, const ItemType::Ptr &type2, const ReportContext::Ptr &context) const
virtual SequenceType::Ptr staticType() const =0
virtual ItemType::Ptr itemType() const =0

Properties

◆ direction

Direction QPatternist::OrderBy::OrderSpec::direction

We place these afterwards, such that m_expr gets aligned at the start of the address.

Definition at line 135 of file qorderby_p.h.

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

◆ m_expr

Expression::Ptr QPatternist::OrderBy::OrderSpec::m_expr
private

Definition at line 128 of file qorderby_p.h.

Referenced by actualReflection().

◆ orderingEmptySequence

StaticContext::OrderingEmptySequence QPatternist::OrderBy::OrderSpec::orderingEmptySequence

Definition at line 137 of file qorderby_p.h.

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


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