Qt 4.8
|
A helper class for element and group reference resolving. More...
#include <qxsdreference_p.h>
Public Types | |
typedef QExplicitlySharedDataPointer< XsdReference > | Ptr |
enum | Type { Element, ModelGroup } |
Public Types inherited from QPatternist::XsdTerm | |
typedef QExplicitlySharedDataPointer< XsdTerm > | Ptr |
Public Types inherited from QPatternist::NamedSchemaComponent | |
enum | BlockingConstraint { RestrictionConstraint = 1, ExtensionConstraint = 2, SubstitutionConstraint = 4 } |
typedef QExplicitlySharedDataPointer< NamedSchemaComponent > | Ptr |
Public Functions | |
virtual bool | isReference () const |
QXmlName | referenceName () const |
void | setReferenceName (const QXmlName &ame) |
void | setSourceLocation (const QSourceLocation &location) |
void | setType (Type type) |
QSourceLocation | sourceLocation () const |
Type | type () const |
Public Functions inherited from QPatternist::XsdTerm | |
virtual bool | isElement () const |
virtual bool | isModelGroup () const |
virtual bool | isWildcard () const |
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 |
Protected Functions inherited from QPatternist::XsdTerm | |
XsdTerm () | |
A helper class for element and group reference resolving.
For easy resolving of element and group references, we have this class that can be used as a place holder for the real element or group object it is referring to. So whenever the parser detects an element or group reference, it creates a XsdReference and returns it instead of the XsdElement or XsdModelGroup. During a later phase, the resolver will look for all XsdReferences in the schema and will replace them with their referring XsdElement or XsdModelGroup objects.
Definition at line 80 of file qxsdreference_p.h.
Definition at line 83 of file qxsdreference_p.h.
Describes the type of the reference.
Enumerator | |
---|---|
Element | The reference points to an element. |
ModelGroup | The reference points to a model group. |
Definition at line 88 of file qxsdreference_p.h.
|
virtual |
Returns always true
, used to avoid dynamic casts.
Reimplemented from QPatternist::XsdTerm.
Definition at line 48 of file qxsdreference.cpp.
QXmlName XsdReference::referenceName | ( | ) | const |
Returns the name of the referenced object.
Definition at line 68 of file qxsdreference.cpp.
Referenced by setReferenceName().
void XsdReference::setReferenceName | ( | const QXmlName & | ame | ) |
Sets the name
of the referenced object.
The name can either be a top-level element declaration or a top-level group declaration.
Definition at line 63 of file qxsdreference.cpp.
void XsdReference::setSourceLocation | ( | const QSourceLocation & | location | ) |
Sets the source location
where the reference is located.
Definition at line 73 of file qxsdreference.cpp.
void XsdReference::setType | ( | Type | type | ) |
QSourceLocation XsdReference::sourceLocation | ( | ) | const |
Returns the source location where the reference is located.
Definition at line 78 of file qxsdreference.cpp.
XsdReference::Type XsdReference::type | ( | ) | const |
Returns the type of the reference.
Definition at line 58 of file qxsdreference.cpp.
Referenced by setType().
|
private |
Definition at line 136 of file qxsdreference_p.h.
Referenced by referenceName(), and setReferenceName().
|
private |
Definition at line 137 of file qxsdreference_p.h.
Referenced by setSourceLocation(), and sourceLocation().
|
private |
Definition at line 135 of file qxsdreference_p.h.