Qt 4.8
Public Types | Public Functions | Properties | List of all members
QPatternist::XsdSimpleType Class Reference

Represents a XSD simpleType object. More...

#include <qxsdsimpletype_p.h>

Inheritance diagram for QPatternist::XsdSimpleType:
QPatternist::XsdUserSchemaType< AnySimpleType > QPatternist::AnySimpleType QPatternist::NamedSchemaComponent QPatternist::XsdAnnotated QPatternist::AnyType QPatternist::SchemaComponent QPatternist::SchemaType QSharedData QPatternist::SchemaComponent QSharedData

Public Types

typedef QExplicitlySharedDataPointer< XsdSimpleTypePtr
 
- Public Types inherited from QPatternist::XsdUserSchemaType< AnySimpleType >
typedef QExplicitlySharedDataPointer< XsdUserSchemaTypePtr
 
- 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 Types inherited from QPatternist::NamedSchemaComponent
enum  BlockingConstraint { RestrictionConstraint = 1, ExtensionConstraint = 2, SubstitutionConstraint = 4 }
 
typedef QExplicitlySharedDataPointer< NamedSchemaComponentPtr
 

Public Functions

virtual TypeCategory category () const
 
NamedSchemaComponent::Ptr context () const
 
virtual DerivationMethod derivationMethod () const
 
virtual QString displayName (const NamePool::Ptr &namePool) const
 
XsdFacet::Hash facets () const
 
virtual bool isDefinedBySchema () const
 
AnySimpleType::Ptr itemType () const
 
AnySimpleType::List memberTypes () const
 
AnySimpleType::Ptr primitiveType () const
 
void setCategory (TypeCategory category)
 
void setContext (const NamedSchemaComponent::Ptr &component)
 
void setDerivationMethod (DerivationMethod method)
 
void setFacets (const XsdFacet::Hash &facets)
 
void setItemType (const AnySimpleType::Ptr &type)
 
void setMemberTypes (const AnySimpleType::List &types)
 
void setPrimitiveType (const AnySimpleType::Ptr &type)
 
void setWxsSuperType (const SchemaType::Ptr &type)
 
virtual SchemaType::Ptr wxsSuperType () const
 
- Public Functions inherited from QPatternist::XsdUserSchemaType< AnySimpleType >
SchemaType::DerivationConstraints derivationConstraints () const
 
virtual QXmlName name (const NamePool::Ptr &namePool) const
 
void setDerivationConstraints (const SchemaType::DerivationConstraints &constraints)
 
void setName (const QXmlName &name)
 
- Public Functions inherited from QPatternist::AnySimpleType
virtual bool isComplexType () const
 
virtual bool isSimpleType () const
 
virtual ~AnySimpleType ()
 
- Public Functions inherited from QPatternist::AnyType
virtual bool isAbstract () const
 
virtual bool wxsTypeMatches (const SchemaType::Ptr &other) const
 
virtual ~AnyType ()
 
- Public Functions inherited from QPatternist::SchemaType
 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...
 
- Public Functions inherited from QPatternist::NamedSchemaComponent
 NamedSchemaComponent ()
 
void setName (const QXmlName &name)
 
virtual ~NamedSchemaComponent ()
 
- Public Functions inherited from QPatternist::XsdAnnotated
void addAnnotation (const XsdAnnotation::Ptr &annotation)
 
void addAnnotations (const XsdAnnotation::List &annotations)
 
XsdAnnotation::List annotations () const
 

Properties

NamedSchemaComponentm_context
 
DerivationMethod m_derivationMethod
 
XsdFacet::Hash m_facets
 
AnySimpleType::Ptr m_itemType
 
AnySimpleType::List m_memberTypes
 
AnySimpleType::Ptr m_primitiveType
 
SchemaType::Ptr m_superType
 
TypeCategory m_typeCategory
 

Additional Inherited Members

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

Detailed Description

Represents a XSD simpleType object.

This class represents the simpleType object of a XML schema as described here.

It contains information from either a top-level simple type declaration (as child of a schema object) or a local simple type declaration (as descendant of an element or complexType object).

See also
XML Schema API reference
Author
Tobias Koenig tobia.nosp@m.s.ko.nosp@m.enig@.nosp@m.noki.nosp@m.a.com

Definition at line 80 of file qxsdsimpletype_p.h.

Typedefs

◆ Ptr

Definition at line 83 of file qxsdsimpletype_p.h.

Functions

◆ category()

XsdSimpleType::TypeCategory XsdSimpleType::category ( ) const
virtual

◆ context()

NamedSchemaComponent::Ptr XsdSimpleType::context ( ) const

Returns the context component of the simple type.

Definition at line 78 of file qxsdsimpletype.cpp.

79 {
81 }
QExplicitlySharedDataPointer< NamedSchemaComponent > Ptr
NamedSchemaComponent * m_context

◆ derivationMethod()

XsdSimpleType::DerivationMethod XsdSimpleType::derivationMethod ( ) const
virtual

Returns the derivation method of the simple type.

Reimplemented from QPatternist::AnySimpleType.

Definition at line 138 of file qxsdsimpletype.cpp.

Referenced by QPatternist::XsdSchemaChecker::checkConstrainingFacets(), and QPatternist::XsdSchemaResolver::resolveSimpleRestrictions().

139 {
140  return m_derivationMethod;
141 }
DerivationMethod m_derivationMethod

◆ displayName()

QString XsdSimpleType::displayName ( const NamePool::Ptr namePool) const
virtual

Returns the display name of the simple type.

Parameters
namePoolThe name pool the type name is stored in.

Reimplemented from QPatternist::XsdUserSchemaType< AnySimpleType >.

Definition at line 58 of file qxsdsimpletype.cpp.

59 {
60  return np->displayName(name(np));
61 }
virtual QXmlName name(const NamePool::Ptr &namePool) const

◆ facets()

XsdFacet::Hash XsdSimpleType::facets ( ) const

◆ isDefinedBySchema()

bool XsdSimpleType::isDefinedBySchema ( ) const
virtual

Always returns true.

Reimplemented from QPatternist::SchemaType.

Definition at line 143 of file qxsdsimpletype.cpp.

144 {
145  return true;
146 }

◆ itemType()

AnySimpleType::Ptr XsdSimpleType::itemType ( ) const

◆ memberTypes()

AnySimpleType::List XsdSimpleType::memberTypes ( ) const

◆ primitiveType()

AnySimpleType::Ptr XsdSimpleType::primitiveType ( ) const

◆ setCategory()

void XsdSimpleType::setCategory ( TypeCategory  category)

◆ setContext()

void XsdSimpleType::setContext ( const NamedSchemaComponent::Ptr component)

◆ setDerivationMethod()

void XsdSimpleType::setDerivationMethod ( DerivationMethod  method)

◆ setFacets()

void XsdSimpleType::setFacets ( const XsdFacet::Hash facets)

◆ setItemType()

void XsdSimpleType::setItemType ( const AnySimpleType::Ptr type)

◆ setMemberTypes()

void XsdSimpleType::setMemberTypes ( const AnySimpleType::List types)

Sets the member types of the simple type.

The member types are only specified if the category is SimpleTypeUnion.

See also
Member Types Definition

Definition at line 103 of file qxsdsimpletype.cpp.

Referenced by QPatternist::XsdSchemaParser::parseUnion(), QPatternist::XsdSchemaResolver::resolveSimpleRestrictions(), and QPatternist::XsdSchemaResolver::resolveSimpleUnionTypes().

104 {
106 }
AnySimpleType::List m_memberTypes
static const struct @32 types[]

◆ setPrimitiveType()

void XsdSimpleType::setPrimitiveType ( const AnySimpleType::Ptr type)

Sets the primitive type of the simple type.

The primitive type is only specified if the category is SimpleTypeAtomic.

See also
Primitive Type Definition

Definition at line 83 of file qxsdsimpletype.cpp.

Referenced by QPatternist::XsdSchemaResolver::resolveSimpleContentComplexTypes(), and QPatternist::XsdSchemaResolver::resolveSimpleRestrictions().

84 {
86 }
int type
Definition: qmetatype.cpp:239
AnySimpleType::Ptr m_primitiveType

◆ setWxsSuperType()

void XsdSimpleType::setWxsSuperType ( const SchemaType::Ptr type)

◆ wxsSuperType()

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

Properties

◆ m_context

NamedSchemaComponent* QPatternist::XsdSimpleType::m_context
private

Definition at line 205 of file qxsdsimpletype_p.h.

Referenced by context(), and setContext().

◆ m_derivationMethod

DerivationMethod QPatternist::XsdSimpleType::m_derivationMethod
private

Definition at line 211 of file qxsdsimpletype_p.h.

Referenced by derivationMethod(), and setDerivationMethod().

◆ m_facets

XsdFacet::Hash QPatternist::XsdSimpleType::m_facets
private

Definition at line 209 of file qxsdsimpletype_p.h.

Referenced by facets(), and setFacets().

◆ m_itemType

AnySimpleType::Ptr QPatternist::XsdSimpleType::m_itemType
private

Definition at line 207 of file qxsdsimpletype_p.h.

Referenced by itemType(), and setItemType().

◆ m_memberTypes

AnySimpleType::List QPatternist::XsdSimpleType::m_memberTypes
private

Definition at line 208 of file qxsdsimpletype_p.h.

Referenced by memberTypes(), and setMemberTypes().

◆ m_primitiveType

AnySimpleType::Ptr QPatternist::XsdSimpleType::m_primitiveType
private

Definition at line 206 of file qxsdsimpletype_p.h.

Referenced by primitiveType(), and setPrimitiveType().

◆ m_superType

SchemaType::Ptr QPatternist::XsdSimpleType::m_superType
private

Definition at line 204 of file qxsdsimpletype_p.h.

Referenced by setWxsSuperType(), and wxsSuperType().

◆ m_typeCategory

TypeCategory QPatternist::XsdSimpleType::m_typeCategory
private

Definition at line 210 of file qxsdsimpletype_p.h.

Referenced by category(), and setCategory().


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