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

Represents the xs:anySimpleType item type. More...

#include <qanysimpletype_p.h>

Inheritance diagram for QPatternist::AnySimpleType:
QPatternist::AnyType QPatternist::SchemaType QPatternist::SchemaComponent QSharedData QPatternist::AtomicType QPatternist::XsdUserSchemaType< AnySimpleType > QPatternist::BuiltinAtomicType QPatternist::NumericType QPatternist::XsdSimpleType QPatternist::AnyAtomicType QPatternist::AnyURIType QPatternist::Base64BinaryType QPatternist::BooleanType QPatternist::DateTimeType QPatternist::DateType QPatternist::DayTimeDurationType QPatternist::DecimalType QPatternist::DoubleType QPatternist::DurationType QPatternist::FloatType QPatternist::GDayType QPatternist::GMonthDayType QPatternist::GMonthType QPatternist::GYearMonthType QPatternist::GYearType QPatternist::HexBinaryType QPatternist::IntegerType QPatternist::NOTATIONType QPatternist::QNameType QPatternist::SchemaTimeType QPatternist::StringType QPatternist::UntypedAtomicType QPatternist::YearMonthDurationType

Public Types

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 Functions

virtual TypeCategory category () const
 
virtual SchemaType::DerivationMethod derivationMethod () const
 
virtual QString displayName (const NamePool::Ptr &np) const
 
virtual bool isComplexType () const
 
virtual bool isSimpleType () const
 
virtual QXmlName name (const NamePool::Ptr &np) const
 Returns the name of the type. More...
 
virtual SchemaType::Ptr wxsSuperType () const
 
virtual ~AnySimpleType ()
 
- Public Functions inherited from QPatternist::AnyType
virtual DerivationConstraints derivationConstraints () const
 
virtual bool isAbstract () 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 ()
 
- 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...
 

Protected Functions

 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 Variables inherited from QSharedData
QAtomicInt ref
 

Detailed Description

Represents the xs:anySimpleType item type.

See also
XML Schema Part 2: Datatypes Second Edition, The simple ur-type definition
Author
Frans Englich frans.nosp@m..eng.nosp@m.lich@.nosp@m.noki.nosp@m.a.com

Definition at line 73 of file qanysimpletype_p.h.

Typedefs

◆ List

Definition at line 77 of file qanysimpletype_p.h.

◆ Ptr

Definition at line 76 of file qanysimpletype_p.h.

Constructors and Destructors

◆ ~AnySimpleType()

AnySimpleType::~AnySimpleType ( )
virtual

Definition at line 54 of file qanysimpletype.cpp.

55 {
56 }

◆ AnySimpleType()

AnySimpleType::AnySimpleType ( )
protected

Definition at line 50 of file qanysimpletype.cpp.

51 {
52 }

Functions

◆ category()

SchemaType::TypeCategory AnySimpleType::category ( ) const
virtual

◆ derivationMethod()

SchemaType::DerivationMethod AnySimpleType::derivationMethod ( ) const
virtual

The simple ur-type is a "special restriction of the ur-type definition", according to XML Schema Part 2: Datatypes Second Edition about xs:anySimpleType

Returns
DERIVATION_RESTRICTION

Reimplemented from QPatternist::AnyType.

Reimplemented in QPatternist::XsdSimpleType, and QPatternist::AtomicType.

Definition at line 78 of file qanysimpletype.cpp.

◆ displayName()

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

◆ isComplexType()

bool AnySimpleType::isComplexType ( ) const
virtual

Always returns false.

Reimplemented from QPatternist::AnyType.

Definition at line 88 of file qanysimpletype.cpp.

Referenced by QPatternist::XsdSchemaChecker::checkSimpleDerivationRestrictions().

89 {
90  return false;
91 }

◆ isSimpleType()

bool AnySimpleType::isSimpleType ( ) const
virtual

Always returns true.

Reimplemented from QPatternist::SchemaType.

Definition at line 83 of file qanysimpletype.cpp.

Referenced by QPatternist::XsdSchemaChecker::checkSimpleDerivationRestrictions(), and QPatternist::XsdSchemaChecker::checkSimpleTypeConstraints().

84 {
85  return true;
86 }

◆ name()

QXmlName AnySimpleType::name ( const NamePool::Ptr np) const
virtual

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::AnyType.

Reimplemented in QPatternist::NOTATIONType, QPatternist::DerivedStringType< derivedType >, QPatternist::StringType, QPatternist::QNameType, QPatternist::AnyURIType, QPatternist::HexBinaryType, QPatternist::Base64BinaryType, QPatternist::BooleanType, QPatternist::GMonthType, QPatternist::GDayType, QPatternist::GMonthDayType, QPatternist::GYearType, QPatternist::GYearMonthType, QPatternist::DerivedIntegerType< derivedType >, QPatternist::IntegerType, QPatternist::DecimalType, QPatternist::FloatType, QPatternist::DoubleType, QPatternist::DayTimeDurationType, QPatternist::YearMonthDurationType, QPatternist::DurationType, QPatternist::SchemaTimeType, QPatternist::DateType, QPatternist::DateTimeType, QPatternist::UntypedAtomicType, QPatternist::XsdUserSchemaType< AnySimpleType >, and QPatternist::AnyAtomicType.

Definition at line 58 of file qanysimpletype.cpp.

Referenced by QPatternist::XsdSchemaChecker::checkConstrainingFacets(), QPatternist::XsdSchemaChecker::checkSimpleDerivationRestrictions(), displayName(), QPatternist::XsdSchemaResolver::findPrimitiveType(), QPatternist::XsdTypeChecker::isValidString(), QPatternist::XsdSchemaChecker::isValidValue(), and QPatternist::XsdTypeChecker::valuesAreEqual().

59 {
60  return np->allocateQName(StandardNamespaces::xs, QLatin1String("anySimpleType"));
61 }
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
QXmlName allocateQName(const QString &uri, const QString &localName, const QString &prefix=QString())
Definition: qnamepool.cpp:251

◆ wxsSuperType()

SchemaType::Ptr AnySimpleType::wxsSuperType ( ) const
virtual

Friends and Related Functions

◆ BuiltinTypes

friend class BuiltinTypes
friend

Definition at line 78 of file qanysimpletype_p.h.


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