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

A helper class for attribute reference resolving. More...

#include <qxsdattributereference_p.h>

Inheritance diagram for QPatternist::XsdAttributeReference:
QPatternist::XsdAttributeUse QPatternist::XsdAttributeTerm QPatternist::NamedSchemaComponent QPatternist::XsdAnnotated QPatternist::SchemaComponent QSharedData

Public Types

typedef QExplicitlySharedDataPointer< XsdAttributeReferencePtr
 
enum  Type { AttributeUse, AttributeGroup }
 
- Public Types inherited from QPatternist::XsdAttributeUse
typedef QList< XsdAttributeUse::PtrList
 
typedef QExplicitlySharedDataPointer< XsdAttributeUsePtr
 
enum  UseType { OptionalUse, RequiredUse, ProhibitedUse }
 
- Public Types inherited from QPatternist::XsdAttributeTerm
typedef QExplicitlySharedDataPointer< XsdAttributeTermPtr
 
- Public Types inherited from QPatternist::NamedSchemaComponent
enum  BlockingConstraint { RestrictionConstraint = 1, ExtensionConstraint = 2, SubstitutionConstraint = 4 }
 
typedef QExplicitlySharedDataPointer< NamedSchemaComponentPtr
 

Public Functions

virtual bool isAttributeUse () const
 
virtual bool isReference () const
 
QXmlName referenceName () const
 
void setReferenceName (const QXmlName &name)
 
void setSourceLocation (const QSourceLocation &location)
 
void setType (Type type)
 
QSourceLocation sourceLocation () const
 
Type type () const
 
- Public Functions inherited from QPatternist::XsdAttributeUse
XsdAttribute::Ptr attribute () const
 
bool isRequired () const
 
void setAttribute (const XsdAttribute::Ptr &attribute)
 
void setUseType (UseType type)
 
void setValueConstraint (const ValueConstraint::Ptr &constraint)
 
UseType useType () const
 
ValueConstraint::Ptr valueConstraint () const
 
 XsdAttributeUse ()
 
- Public Functions inherited from QPatternist::NamedSchemaComponent
virtual QString displayName (const NamePool::Ptr &namePool) const
 
virtual QXmlName name (const NamePool::Ptr &namePool) const
 
 NamedSchemaComponent ()
 
void setName (const QXmlName &name)
 
virtual ~NamedSchemaComponent ()
 
- 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::XsdAnnotated
void addAnnotation (const XsdAnnotation::Ptr &annotation)
 
void addAnnotations (const XsdAnnotation::List &annotations)
 
XsdAnnotation::List annotations () const
 

Properties

QXmlName m_referenceName
 
QSourceLocation m_sourceLocation
 
Type m_type
 

Additional Inherited Members

- Public Variables inherited from QSharedData
QAtomicInt ref
 

Detailed Description

A helper class for attribute reference resolving.

For easy resolving of attribute references, we have this class that can be used as a place holder for the real attribute use object it is referring to. So whenever the parser detects an attribute reference, it creates a XsdAttributeReference and returns it instead of the XsdAttributeUse. During a later phase, the resolver will look for all XsdAttributeReferences in the schema and will replace them with their referring XsdAttributeUse objects.

Author
Tobias Koenig tobia.nosp@m.s.ko.nosp@m.enig@.nosp@m.noki.nosp@m.a.com

Definition at line 80 of file qxsdattributereference_p.h.

Typedefs

◆ Ptr

Definition at line 83 of file qxsdattributereference_p.h.

Enumerations

◆ Type

Describes the type of the attribute reference.

Enumerator
AttributeUse 

The reference points to an attribute use.

AttributeGroup 

The reference points to an attribute group.

Definition at line 88 of file qxsdattributereference_p.h.

89  {
90  AttributeUse,
92  };
The reference points to an attribute group.
The reference points to an attribute use.

Functions

◆ isAttributeUse()

bool XsdAttributeReference::isAttributeUse ( ) const
virtual

Always returns false, used to avoid dynamic casts.

Reimplemented from QPatternist::XsdAttributeUse.

Definition at line 48 of file qxsdattributereference.cpp.

49 {
50  return false;
51 }

◆ isReference()

bool XsdAttributeReference::isReference ( ) const
virtual

Always returns true, used to avoid dynamic casts.

Reimplemented from QPatternist::XsdAttributeTerm.

Definition at line 53 of file qxsdattributereference.cpp.

54 {
55  return true;
56 }

◆ referenceName()

QXmlName XsdAttributeReference::referenceName ( ) const

Returns the name of the attribute or attribute group the attribute reference refers to.

Definition at line 73 of file qxsdattributereference.cpp.

Referenced by setReferenceName().

◆ setReferenceName()

void XsdAttributeReference::setReferenceName ( const QXmlName name)

Sets the name of the attribute or attribute group the attribute reference refers to.

Definition at line 68 of file qxsdattributereference.cpp.

◆ setSourceLocation()

void XsdAttributeReference::setSourceLocation ( const QSourceLocation location)

Sets the source location where the reference is located.

Definition at line 78 of file qxsdattributereference.cpp.

79 {
81 }
static QTestResult::TestLocation location
Definition: qtestresult.cpp:63

◆ setType()

void XsdAttributeReference::setType ( Type  type)

Sets the type of the attribute reference.

Definition at line 58 of file qxsdattributereference.cpp.

◆ sourceLocation()

QSourceLocation XsdAttributeReference::sourceLocation ( ) const

Returns the source location where the reference is located.

Definition at line 83 of file qxsdattributereference.cpp.

84 {
85  return m_sourceLocation;
86 }

◆ type()

XsdAttributeReference::Type XsdAttributeReference::type ( ) const

Returns the type of the attribute reference.

Definition at line 63 of file qxsdattributereference.cpp.

Referenced by setType().

Properties

◆ m_referenceName

QXmlName QPatternist::XsdAttributeReference::m_referenceName
private

Definition at line 138 of file qxsdattributereference_p.h.

Referenced by referenceName(), and setReferenceName().

◆ m_sourceLocation

QSourceLocation QPatternist::XsdAttributeReference::m_sourceLocation
private

Definition at line 139 of file qxsdattributereference_p.h.

Referenced by setSourceLocation(), and sourceLocation().

◆ m_type

Type QPatternist::XsdAttributeReference::m_type
private

Definition at line 137 of file qxsdattributereference_p.h.

Referenced by setType(), and type().


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