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

Represents a XSD complexType object. More...

#include <qxsdcomplextype_p.h>

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

Classes

class  ContentType
 Describes the content type of a complex type. More...
 
class  OpenContent
 Describes the open content object of a complex type. More...
 

Public Types

typedef QExplicitlySharedDataPointer< XsdComplexTypePtr
 
- Public Types inherited from QPatternist::XsdUserSchemaType< AnyType >
typedef QExplicitlySharedDataPointer< XsdUserSchemaTypePtr
 
- 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

void addAssertion (const XsdAssertion::Ptr &assertion)
 
void addAttributeUse (const XsdAttributeUse::Ptr &use)
 
XsdAssertion::List assertions () const
 
XsdAttributeUse::List attributeUses () const
 
XsdWildcard::Ptr attributeWildcard () const
 
virtual TypeCategory category () const
 
ContentType::Ptr contentType () const
 
NamedSchemaComponent::Ptr context () const
 
virtual DerivationMethod derivationMethod () const
 
virtual QString displayName (const NamePool::Ptr &namePool) const
 
virtual bool isAbstract () const
 
virtual bool isDefinedBySchema () const
 
BlockingConstraints prohibitedSubstitutions () const
 
void setAssertions (const XsdAssertion::List &assertions)
 
void setAttributeUses (const XsdAttributeUse::List &uses)
 
void setAttributeWildcard (const XsdWildcard::Ptr &wildcard)
 
void setContentType (const ContentType::Ptr &type)
 
void setContext (const NamedSchemaComponent::Ptr &component)
 
void setDerivationMethod (DerivationMethod method)
 
void setIsAbstract (bool abstract)
 
void setProhibitedSubstitutions (const BlockingConstraints &substitutions)
 
void setWxsSuperType (const SchemaType::Ptr &type)
 
virtual SchemaType::Ptr wxsSuperType () const
 
 XsdComplexType ()
 
 ~XsdComplexType ()
 
- Public Functions inherited from QPatternist::XsdUserSchemaType< AnyType >
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::AnyType
virtual bool isComplexType () const
 
virtual bool wxsTypeMatches (const SchemaType::Ptr &other) const
 
virtual ~AnyType ()
 
- Public Functions inherited from QPatternist::SchemaType
virtual bool isSimpleType () 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...
 
- 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

XsdAssertion::List m_assertions
 
XsdAttributeUse::List m_attributeUses
 
XsdWildcard::Ptr m_attributeWildcard
 
ContentType::Ptr m_contentType
 
NamedSchemaComponentm_context
 
DerivationMethod m_derivationMethod
 
bool m_isAbstract
 
BlockingConstraints m_prohibitedSubstitutions
 
SchemaTypem_superType
 

Additional Inherited Members

- Public Variables inherited from QSharedData
QAtomicInt ref
 
- Protected Functions inherited from QPatternist::AnyType
 AnyType ()
 This constructor is protected, because this class must be sub-classed. More...
 

Detailed Description

Represents a XSD complexType object.

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

It contains information from either a top-level complex type declaration (as child of a schema object) or a local complex type declaration (as descendant of an element 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 84 of file qxsdcomplextype_p.h.

Typedefs

◆ Ptr

Definition at line 87 of file qxsdcomplextype_p.h.

Constructors and Destructors

◆ XsdComplexType()

XsdComplexType::XsdComplexType ( )

Creates a complex type object with empty content.

Definition at line 109 of file qxsdcomplextype.cpp.

110  : m_isAbstract(false)
111  , m_contentType(new ContentType())
112 {
114 }
The complex type has no further content.

◆ ~XsdComplexType()

QPatternist::XsdComplexType::~XsdComplexType ( )
inline

Destroys the complex type object.

Definition at line 239 of file qxsdcomplextype_p.h.

239 {};

Functions

◆ addAssertion()

void XsdComplexType::addAssertion ( const XsdAssertion::Ptr assertion)

◆ addAttributeUse()

void XsdComplexType::addAttributeUse ( const XsdAttributeUse::Ptr use)

◆ assertions()

XsdAssertion::List XsdComplexType::assertions ( ) const

Returns the assertions of the complex type.

Definition at line 221 of file qxsdcomplextype.cpp.

Referenced by setAssertions(), and ~XsdComplexType().

222 {
223  return m_assertions;
224 }
XsdAssertion::List m_assertions

◆ attributeUses()

XsdAttributeUse::List XsdComplexType::attributeUses ( ) const

◆ attributeWildcard()

XsdWildcard::Ptr XsdComplexType::attributeWildcard ( ) const

◆ category()

XsdComplexType::TypeCategory XsdComplexType::category ( ) const
virtual

Always returns SchemaType::ComplexType

Reimplemented from QPatternist::AnyType.

Definition at line 186 of file qxsdcomplextype.cpp.

Referenced by ~XsdComplexType().

◆ contentType()

XsdComplexType::ContentType::Ptr XsdComplexType::contentType ( ) const

◆ context()

NamedSchemaComponent::Ptr XsdComplexType::context ( ) const

Returns the context component of the complex type.

Definition at line 146 of file qxsdcomplextype.cpp.

Referenced by ~XsdComplexType().

147 {
149 }
QExplicitlySharedDataPointer< NamedSchemaComponent > Ptr
NamedSchemaComponent * m_context

◆ derivationMethod()

XsdComplexType::DerivationMethod XsdComplexType::derivationMethod ( ) const
virtual

◆ displayName()

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

Returns the display name of the complex type.

The display name can be used to show the type name to the user.

Parameters
namePoolThe name pool where the type name is stored in.

Reimplemented from QPatternist::XsdUserSchemaType< AnyType >.

Definition at line 126 of file qxsdcomplextype.cpp.

Referenced by QPatternist::XsdSchemaDebugger::dumpType(), and ~XsdComplexType().

127 {
128  return np->displayName(name(np));
129 }
virtual QXmlName name(const NamePool::Ptr &namePool) const

◆ isAbstract()

bool XsdComplexType::isAbstract ( ) const
virtual

Returns whether the complex type is abstract.

Reimplemented from QPatternist::AnyType.

Definition at line 121 of file qxsdcomplextype.cpp.

Referenced by QPatternist::XsdSchemaDebugger::dumpType(), QPatternist::XsdValidatingInstanceReader::validateElementType(), and ~XsdComplexType().

122 {
123  return m_isAbstract;
124 }

◆ isDefinedBySchema()

bool XsdComplexType::isDefinedBySchema ( ) const
virtual

Always returns true.

Reimplemented from QPatternist::SchemaType.

Definition at line 226 of file qxsdcomplextype.cpp.

Referenced by ~XsdComplexType().

227 {
228  return true;
229 }

◆ prohibitedSubstitutions()

XsdComplexType::BlockingConstraints XsdComplexType::prohibitedSubstitutions ( ) const

◆ setAssertions()

void XsdComplexType::setAssertions ( const XsdAssertion::List assertions)

Sets the assertions of the complex type.

See also
Assertions Definition

Definition at line 211 of file qxsdcomplextype.cpp.

Referenced by ~XsdComplexType().

212 {
214 }
XsdAssertion::List m_assertions
XsdAssertion::List assertions() const

◆ setAttributeUses()

void XsdComplexType::setAttributeUses ( const XsdAttributeUse::List uses)

Sets the list of all attribute uses of the complex type.

See also
Attribute Uses Declaration

Definition at line 161 of file qxsdcomplextype.cpp.

Referenced by QPatternist::XsdSchemaResolver::resolveAttributeTermReferences(), and ~XsdComplexType().

162 {
164 }
XsdAttributeUse::List m_attributeUses
XsdAttributeUse::List attributeUses() const

◆ setAttributeWildcard()

void XsdComplexType::setAttributeWildcard ( const XsdWildcard::Ptr wildcard)

◆ setContentType()

void XsdComplexType::setContentType ( const ContentType::Ptr type)

Sets the content type of the complex type.

See also
ContentType

Definition at line 151 of file qxsdcomplextype.cpp.

Referenced by QPatternist::XsdSchemaResolver::resolveComplexContentComplexTypes(), and ~XsdComplexType().

152 {
154 }
int type
Definition: qmetatype.cpp:239

◆ setContext()

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

Sets the context component of the complex type.

The component is either an element declaration or a complex type definition.

Definition at line 141 of file qxsdcomplextype.cpp.

Referenced by QPatternist::XsdSchemaParser::parseGlobalElement(), QPatternist::XsdSchemaParser::parseLocalElement(), and ~XsdComplexType().

142 {
143  m_context = component.data();
144 }
NamedSchemaComponent * m_context
T * data() const
Returns a pointer to the shared data object.
Definition: qshareddata.h:145

◆ setDerivationMethod()

void XsdComplexType::setDerivationMethod ( DerivationMethod  method)

◆ setIsAbstract()

void XsdComplexType::setIsAbstract ( bool  abstract)

Sets whether the complex type is abstract.

See also
Abstract Definition

Definition at line 116 of file qxsdcomplextype.cpp.

Referenced by QPatternist::XsdValidatingInstanceReader::anyType(), QPatternist::XsdSchemaParser::parseGlobalComplexType(), and ~XsdComplexType().

117 {
118  m_isAbstract = abstract;
119 }

◆ setProhibitedSubstitutions()

void XsdComplexType::setProhibitedSubstitutions ( const BlockingConstraints &  substitutions)

Sets the prohibited substitutions of the complex type.

Only ExtensionConstraint and RestrictionConstraint are allowed.

See also
Prohibited Substitutions Definition

Definition at line 201 of file qxsdcomplextype.cpp.

Referenced by QPatternist::XsdSchemaParser::parseGlobalComplexType(), and ~XsdComplexType().

202 {
203  m_prohibitedSubstitutions = substitutions;
204 }
BlockingConstraints m_prohibitedSubstitutions

◆ setWxsSuperType()

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

◆ wxsSuperType()

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

Properties

◆ m_assertions

XsdAssertion::List QPatternist::XsdComplexType::m_assertions
private

Definition at line 396 of file qxsdcomplextype_p.h.

Referenced by addAssertion(), assertions(), and setAssertions().

◆ m_attributeUses

XsdAttributeUse::List QPatternist::XsdComplexType::m_attributeUses
private

Definition at line 392 of file qxsdcomplextype_p.h.

Referenced by addAttributeUse(), attributeUses(), and setAttributeUses().

◆ m_attributeWildcard

XsdWildcard::Ptr QPatternist::XsdComplexType::m_attributeWildcard
private

Definition at line 393 of file qxsdcomplextype_p.h.

Referenced by attributeWildcard(), and setAttributeWildcard().

◆ m_contentType

ContentType::Ptr QPatternist::XsdComplexType::m_contentType
private

Definition at line 394 of file qxsdcomplextype_p.h.

Referenced by contentType(), setContentType(), and XsdComplexType().

◆ m_context

NamedSchemaComponent* QPatternist::XsdComplexType::m_context
private

Definition at line 389 of file qxsdcomplextype_p.h.

Referenced by context(), and setContext().

◆ m_derivationMethod

DerivationMethod QPatternist::XsdComplexType::m_derivationMethod
private

Definition at line 390 of file qxsdcomplextype_p.h.

Referenced by derivationMethod(), and setDerivationMethod().

◆ m_isAbstract

bool QPatternist::XsdComplexType::m_isAbstract
private

Definition at line 391 of file qxsdcomplextype_p.h.

Referenced by isAbstract(), and setIsAbstract().

◆ m_prohibitedSubstitutions

BlockingConstraints QPatternist::XsdComplexType::m_prohibitedSubstitutions
private

Definition at line 395 of file qxsdcomplextype_p.h.

Referenced by prohibitedSubstitutions(), and setProhibitedSubstitutions().

◆ m_superType

SchemaType* QPatternist::XsdComplexType::m_superType
private

Definition at line 388 of file qxsdcomplextype_p.h.

Referenced by setWxsSuperType(), and wxsSuperType().


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