Qt 4.8
Public Functions | Properties | Related Functions | List of all members
QPatternist::GenericSequenceType Class Reference

#include <qgenericsequencetype_p.h>

Inheritance diagram for QPatternist::GenericSequenceType:
QPatternist::SequenceType QSharedData

Public Functions

virtual Cardinality cardinality () const
 
virtual QString displayName (const NamePool::Ptr &np) const
 
 GenericSequenceType (const ItemType::Ptr &itemType, const Cardinality &card)
 
virtual ItemType::Ptr itemType () const
 
- Public Functions inherited from QPatternist::SequenceType
bool is (const SequenceType::Ptr &other) const
 
bool matches (const SequenceType::Ptr other) const
 
 SequenceType ()
 
virtual ~SequenceType ()
 
- 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...
 

Properties

const Cardinality m_cardinality
 
const ItemType::Ptr m_itemType
 

Related Functions

(Note that these are not member functions.)

static SequenceType::Ptr makeGenericSequenceType (const ItemType::Ptr &itemType, const Cardinality &cardinality)
 An object generator for GenericSequenceType. More...
 

Additional Inherited Members

- Public Types inherited from QPatternist::SequenceType
typedef QList< SequenceType::PtrList
 
typedef QExplicitlySharedDataPointer< const SequenceTypePtr
 
- Public Variables inherited from QSharedData
QAtomicInt ref
 

Detailed Description

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

Definition at line 70 of file qgenericsequencetype_p.h.

Constructors and Destructors

◆ GenericSequenceType()

GenericSequenceType::GenericSequenceType ( const ItemType::Ptr itemType,
const Cardinality card 
)

Definition at line 50 of file qgenericsequencetype.cpp.

Referenced by makeGenericSequenceType().

51  : m_itemType(iType),
52  m_cardinality(card)
53 {
55 }
#define iType(varName, parent)
#define Q_ASSERT(cond)
Definition: qglobal.h:1823

Functions

◆ cardinality()

Cardinality GenericSequenceType::cardinality ( ) const
virtual

Implements QPatternist::SequenceType.

Definition at line 62 of file qgenericsequencetype.cpp.

63 {
64  return m_cardinality;
65 }

◆ displayName()

QString GenericSequenceType::displayName ( const NamePool::Ptr np) const
virtual

Generates a name for the sequence type for display purposes. The prefix used for the QName identifying the schema type is conventional. An example of a display name for a GenericSequenceType is "xs:integer?".

Implements QPatternist::SequenceType.

Definition at line 57 of file qgenericsequencetype.cpp.

58 {
60 }
QString displayName(const CustomizeDisplayName explanation) const
virtual QString displayName(const NamePool::Ptr &np) const =0

◆ itemType()

ItemType::Ptr GenericSequenceType::itemType ( ) const
virtual

Implements QPatternist::SequenceType.

Definition at line 67 of file qgenericsequencetype.cpp.

68 {
69  return m_itemType;
70 }

Friends and Related Functions

◆ makeGenericSequenceType()

static SequenceType::Ptr makeGenericSequenceType ( const ItemType::Ptr itemType,
const Cardinality cardinality 
)
related

An object generator for GenericSequenceType.

makeGenericSequenceType() is a convenience function for avoiding invoking the new operator, and wrapping the result in GenericSequenceType::Ptr.

Returns
a smart pointer to to a GenericSequenceType instaniated from itemType and cardinality.

Definition at line 101 of file qgenericsequencetype_p.h.

102  {
103  /* An empty sequence of say integers, is the empty-sequence(). */
104  if(cardinality.isEmpty())
106  else
108  }
virtual ItemType::Ptr itemType() const
static const EmptySequenceType::Ptr Empty
GenericSequenceType(const ItemType::Ptr &itemType, const Cardinality &card)
QExplicitlySharedDataPointer< const SequenceType > Ptr
virtual Cardinality cardinality() const

Properties

◆ m_cardinality

const Cardinality QPatternist::GenericSequenceType::m_cardinality
private

Definition at line 88 of file qgenericsequencetype_p.h.

Referenced by cardinality(), and displayName().

◆ m_itemType

const ItemType::Ptr QPatternist::GenericSequenceType::m_itemType
private

Definition at line 87 of file qgenericsequencetype_p.h.

Referenced by displayName(), GenericSequenceType(), and itemType().


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