Qt 4.8
Public Functions | Protected Functions | Friends | List of all members
QPatternist::DerivedIntegerType< derivedType > Class Template Reference

#include <qatomictypedispatch_p.h>

Inheritance diagram for QPatternist::DerivedIntegerType< derivedType >:
QPatternist::IntegerType QPatternist::BuiltinAtomicType QPatternist::AtomicType QPatternist::ItemType QPatternist::AnySimpleType QSharedData QPatternist::AnyType QPatternist::SchemaType QPatternist::SchemaComponent QSharedData

Public Functions

virtual AtomicTypeVisitorResult::Ptr accept (const AtomicTypeVisitor::Ptr &v, const SourceLocationReflection *const r) const
 
virtual QString displayName (const NamePool::Ptr &np) const
 
virtual QXmlName name (const NamePool::Ptr &np) const
 Returns the name of the type. More...
 
- Public Functions inherited from QPatternist::IntegerType
virtual AtomicTypeVisitorResult::Ptr accept (const ParameterizedAtomicTypeVisitor::Ptr &visitor, const qint16 op, const SourceLocationReflection *const reflection) const
 
- Public Functions inherited from QPatternist::BuiltinAtomicType
virtual AtomicCasterLocator::Ptr casterLocator () const
 
virtual AtomicComparatorLocator::Ptr comparatorLocator () const
 
virtual bool isAbstract () const
 
virtual AtomicMathematicianLocator::Ptr mathematicianLocator () const
 
virtual SchemaType::Ptr wxsSuperType () const
 
virtual ItemType::Ptr xdtSuperType () const
 
- Public Functions inherited from QPatternist::AtomicType
virtual AtomicTypeVisitorResult::Ptr accept (const QExplicitlySharedDataPointer< AtomicTypeVisitor > &visitor, const SourceLocationReflection *const) const =0
 
virtual ItemType::Ptr atomizedType () const
 
virtual TypeCategory category () const
 
virtual DerivationMethod derivationMethod () const
 
virtual bool isAtomicType () const
 
virtual bool isNodeType () const
 
virtual bool itemMatches (const Item &item) const
 
virtual bool xdtTypeMatches (const ItemType::Ptr &other) const
 
virtual ~AtomicType ()
 
- 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::AnySimpleType
virtual bool isComplexType () const
 
virtual bool isSimpleType () const
 
virtual ~AnySimpleType ()
 
- Public Functions inherited from QPatternist::AnyType
virtual DerivationConstraints derivationConstraints () const
 
virtual bool wxsTypeMatches (const SchemaType::Ptr &other) const
 
virtual ~AnyType ()
 
- Public Functions inherited from QPatternist::SchemaType
virtual bool isDefinedBySchema () const
 
 SchemaType ()
 
virtual ~SchemaType ()
 
- Public Functions inherited from QPatternist::SchemaComponent
 SchemaComponent ()
 
virtual ~SchemaComponent ()
 

Protected Functions

 DerivedIntegerType (const AtomicType::Ptr &parentType, const AtomicCasterLocator::Ptr &casterLoc)
 
- Protected Functions inherited from QPatternist::IntegerType
 IntegerType (const AtomicType::Ptr &parentType, const AtomicCasterLocator::Ptr &casterLocator)
 
- Protected Functions inherited from QPatternist::BuiltinAtomicType
 BuiltinAtomicType (const AtomicType::Ptr &baseType, const AtomicComparatorLocator::Ptr &comp, const AtomicMathematicianLocator::Ptr &mather, const AtomicCasterLocator::Ptr &casterLocator)
 
- Protected Functions inherited from QPatternist::AtomicType
 AtomicType ()
 
- Protected Functions inherited from QPatternist::AnySimpleType
 AnySimpleType ()
 
- Protected Functions inherited from QPatternist::AnyType
 AnyType ()
 This constructor is protected, because this class must be sub-classed. More...
 

Friends

class BuiltinTypes
 

Additional Inherited Members

- Public Types inherited from QPatternist::IntegerType
typedef QExplicitlySharedDataPointer< IntegerTypePtr
 
- Public Types inherited from QPatternist::BuiltinAtomicType
typedef QExplicitlySharedDataPointer< BuiltinAtomicTypePtr
 
- Public Types inherited from QPatternist::AtomicType
typedef QExplicitlySharedDataPointer< AtomicTypePtr
 
- 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::AnySimpleType
typedef QList< AnySimpleType::PtrList
 
typedef QExplicitlySharedDataPointer< AnySimpleTypePtr
 
- Public Types inherited from QPatternist::AnyType
typedef QExplicitlySharedDataPointer< AnyTypePtr
 
- Public Types inherited from QPatternist::SchemaType
enum  DerivationConstraint { RestrictionConstraint = 1, ExtensionConstraint = 2, ListConstraint = 4, UnionConstraint = 8 }
 
enum  DerivationMethod {
  DerivationRestriction = 1, DerivationExtension = 2, DerivationUnion = 4, DerivationList = 8,
  NoDerivation = 16
}
 
typedef QHash< QXmlName, SchemaType::PtrHash
 
typedef QList< SchemaType::PtrList
 
typedef QExplicitlySharedDataPointer< SchemaTypePtr
 
enum  TypeCategory {
  None = 0, SimpleTypeAtomic, SimpleTypeList, SimpleTypeUnion,
  ComplexType
}
 
- Public Variables inherited from QSharedData
QAtomicInt ref
 

Detailed Description

template<TypeOfDerivedInteger derivedType>
class QPatternist::DerivedIntegerType< derivedType >

Definition at line 106 of file qatomictypedispatch_p.h.

Constructors and Destructors

◆ DerivedIntegerType()

template<TypeOfDerivedInteger derivedType>
QPatternist::DerivedIntegerType< derivedType >::DerivedIntegerType ( const AtomicType::Ptr parentType,
const AtomicCasterLocator::Ptr casterLoc 
)
inlineprotected

Definition at line 426 of file qbuiltinatomictypes_p.h.

427  : IntegerType(parentType, casterLoc)
428  {
429  }
IntegerType(const AtomicType::Ptr &parentType, const AtomicCasterLocator::Ptr &casterLocator)

Functions

◆ accept()

template<TypeOfDerivedInteger derivedType>
virtual AtomicTypeVisitorResult::Ptr QPatternist::DerivedIntegerType< derivedType >::accept ( const AtomicTypeVisitor::Ptr v,
const SourceLocationReflection *const  r 
) const
inlinevirtual

Reimplemented from QPatternist::IntegerType.

Definition at line 390 of file qbuiltinatomictypes_p.h.

392  {
393  return v->visit(this, r);
394  }

◆ displayName()

template<TypeOfDerivedInteger derivedType>
virtual QString QPatternist::DerivedIntegerType< derivedType >::displayName ( const NamePool::Ptr np) const
inlinevirtual
Returns
the result of SharedQXmlName::displayName(), of the SharedQName object returned from the name() function.

Reimplemented from QPatternist::IntegerType.

Definition at line 418 of file qbuiltinatomictypes_p.h.

419  {
420  return np->displayName(name(np));
421  }
virtual QXmlName name(const NamePool::Ptr &np) const
Returns the name of the type.

◆ name()

template<TypeOfDerivedInteger derivedType>
virtual QXmlName QPatternist::DerivedIntegerType< derivedType >::name ( const NamePool::Ptr np) const
inlinevirtual

Returns the name of the type.

The reason to why we take the name pool argument, is that the basic types, xs:anySimpleType and so on, are stored globally in BuiltinTypes and ComonSequenceTypes, and therefore cannot be tied to a certain name pool. Type instances that knows they always will be used with a certain name pool, can therefore ignore np and return a QXmlName instance stored as a member.

If the type code was refactored to not be store globally and therefore by design would be tied to a name pool, this argument could be removed.

Reimplemented from QPatternist::IntegerType.

Definition at line 396 of file qbuiltinatomictypes_p.h.

397  {
398  switch(derivedType)
399  {
400  case TypeByte: return np->allocateQName(StandardNamespaces::xs, QLatin1String("byte"));
401  case TypeInt: return np->allocateQName(StandardNamespaces::xs, QLatin1String("int"));
402  case TypeLong: return np->allocateQName(StandardNamespaces::xs, QLatin1String("long"));
403  case TypeNegativeInteger: return np->allocateQName(StandardNamespaces::xs, QLatin1String("negativeInteger"));
404  case TypeNonNegativeInteger: return np->allocateQName(StandardNamespaces::xs, QLatin1String("nonNegativeInteger"));
405  case TypeNonPositiveInteger: return np->allocateQName(StandardNamespaces::xs, QLatin1String("nonPositiveInteger"));
406  case TypePositiveInteger: return np->allocateQName(StandardNamespaces::xs, QLatin1String("positiveInteger"));
407  case TypeShort: return np->allocateQName(StandardNamespaces::xs, QLatin1String("short"));
408  case TypeUnsignedByte: return np->allocateQName(StandardNamespaces::xs, QLatin1String("unsignedByte"));
409  case TypeUnsignedInt: return np->allocateQName(StandardNamespaces::xs, QLatin1String("unsignedInt"));
410  case TypeUnsignedLong: return np->allocateQName(StandardNamespaces::xs, QLatin1String("unsignedLong"));
411  case TypeUnsignedShort: return np->allocateQName(StandardNamespaces::xs, QLatin1String("unsignedShort"));
412  }
413 
414  Q_ASSERT_X(false, "DerivedIntegerType::name()", "Invalid value in instantiation.");
415  return QXmlName();
416  }
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
#define Q_ASSERT_X(cond, where, what)
Definition: qglobal.h:1837
The QXmlName class represents the name of an XML node, in an efficient, namespace-aware way...
Definition: qxmlname.h:58

Friends and Related Functions

◆ BuiltinTypes

template<TypeOfDerivedInteger derivedType>
friend class BuiltinTypes
friend

Definition at line 424 of file qbuiltinatomictypes_p.h.


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