Qt 4.8
Public Types | Public Functions | Protected Functions | Friends | List of all members
QPatternist::EmptySequenceType Class Reference

Represents the empty-sequence() type. More...

#include <qemptysequencetype_p.h>

Inheritance diagram for QPatternist::EmptySequenceType:
QPatternist::ItemType QPatternist::SequenceType QSharedData QSharedData

Public Types

typedef QExplicitlySharedDataPointer< EmptySequenceTypePtr
 
- Public Types inherited from QPatternist::ItemType
enum  Category { NodeNameTest = 1, Other = 2 }
 
enum  InstanceOf { ClassLocalNameTest, ClassNamespaceNameTest, ClassQNameTest, ClassOther }
 
typedef QList< ItemType::PtrList
 
typedef QExplicitlySharedDataPointer< ItemTypePtr
 
- Public Types inherited from QPatternist::SequenceType
typedef QList< SequenceType::PtrList
 
typedef QExplicitlySharedDataPointer< const SequenceTypePtr
 

Public Functions

virtual ItemType::Ptr atomizedType () const
 
virtual Cardinality cardinality () const
 
virtual QString displayName (const NamePool::Ptr &np) const
 
virtual bool isAtomicType () const
 
virtual bool isNodeType () const
 
virtual bool itemMatches (const Item &item) const
 
virtual ItemType::Ptr itemType () const
 
virtual ItemType::Ptr xdtSuperType () const
 
virtual bool xdtTypeMatches (const ItemType::Ptr &other) const
 
- Public Functions inherited from QPatternist::ItemType
virtual InstanceOf instanceOf () const
 
 ItemType ()
 
virtual Category itemTypeCategory () const
 
bool operator!= (const ItemType &other) const
 
virtual bool operator== (const ItemType &other) const
 
virtual const ItemTypeoperator| (const ItemType &other) const
 
virtual ~ItemType ()
 
- 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::SequenceType
bool is (const SequenceType::Ptr &other) const
 
bool matches (const SequenceType::Ptr other) const
 
 SequenceType ()
 
virtual ~SequenceType ()
 

Protected Functions

 EmptySequenceType ()
 

Friends

class CommonSequenceTypes
 

Additional Inherited Members

- Public Variables inherited from QSharedData
QAtomicInt ref
 

Detailed Description

Represents the empty-sequence() type.

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

Definition at line 71 of file qemptysequencetype_p.h.

Typedefs

◆ Ptr

Definition at line 75 of file qemptysequencetype_p.h.

Constructors and Destructors

◆ EmptySequenceType()

EmptySequenceType::EmptySequenceType ( )
protected

Definition at line 51 of file qemptysequencetype.cpp.

52 {
53 }

Functions

◆ atomizedType()

ItemType::Ptr EmptySequenceType::atomizedType ( ) const
virtual
Returns
always xs:anyAtomicType

Implements QPatternist::ItemType.

Definition at line 96 of file qemptysequencetype.cpp.

97 {
99 }
static const AtomicType::Ptr xsAnyAtomicType

◆ cardinality()

Cardinality EmptySequenceType::cardinality ( ) const
virtual
Returns
always Cardinality::empty()

Implements QPatternist::SequenceType.

Definition at line 76 of file qemptysequencetype.cpp.

77 {
78  return Cardinality::empty();
79 }
static Cardinality empty()

◆ displayName()

QString EmptySequenceType::displayName ( const NamePool::Ptr np) const
virtual
Returns
always "empty-sequence()"

Implements QPatternist::ItemType.

Definition at line 66 of file qemptysequencetype.cpp.

67 {
68  return QLatin1String("empty-sequence()");
69 }
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString

◆ isAtomicType()

bool EmptySequenceType::isAtomicType ( ) const
virtual

Implements QPatternist::ItemType.

Definition at line 91 of file qemptysequencetype.cpp.

92 {
93  return false;
94 }

◆ isNodeType()

bool EmptySequenceType::isNodeType ( ) const
virtual

Implements QPatternist::ItemType.

Definition at line 86 of file qemptysequencetype.cpp.

87 {
88  return false;
89 }

◆ itemMatches()

bool EmptySequenceType::itemMatches ( const Item item) const
virtual
Returns
always false

Implements QPatternist::ItemType.

Definition at line 61 of file qemptysequencetype.cpp.

62 {
63  return false;
64 }

◆ itemType()

ItemType::Ptr EmptySequenceType::itemType ( ) const
virtual
Returns
always 'this' since it is also an ItemType

Implements QPatternist::SequenceType.

Definition at line 81 of file qemptysequencetype.cpp.

82 {
83  return ItemType::Ptr(const_cast<EmptySequenceType *>(this));
84 }
QExplicitlySharedDataPointer< ItemType > Ptr
Definition: qitemtype_p.h:88

◆ xdtSuperType()

ItemType::Ptr EmptySequenceType::xdtSuperType ( ) const
virtual

Determines the type's parent type in the XPath Data Model hierarchy. For example, for the type xs:anyAtomicType, the super type in the XPath Data Model is item(), not xs:anySimpleType. SchemaType::xdtSuperType navigates the schema hierarchy.

See also
SchemaType::wxsSuperType()
Returns
the type's super type.

Implements QPatternist::ItemType.

Definition at line 71 of file qemptysequencetype.cpp.

72 {
73  return BuiltinTypes::item;
74 }
static const ItemType::Ptr item

◆ xdtTypeMatches()

bool EmptySequenceType::xdtTypeMatches ( const ItemType::Ptr other) const
virtual

Possibly surprisingly, this function also returns true for the none type.

Returns
true if other is NoneType or EmptySequenceType, otherwise false.

Implements QPatternist::ItemType.

Definition at line 55 of file qemptysequencetype.cpp.

56 {
57  return *other == *this ||
58  CommonSequenceTypes::None->xdtTypeMatches(other);
59 }

Friends and Related Functions

◆ CommonSequenceTypes

friend class CommonSequenceTypes
friend

Definition at line 115 of file qemptysequencetype_p.h.


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