Qt 4.8
Public Types | Public Functions | Static Public Functions | Properties | List of all members
QPatternist::XsdAttributeUse::ValueConstraint Class Reference

#include <qxsdattributeuse_p.h>

Inheritance diagram for QPatternist::XsdAttributeUse::ValueConstraint:
QSharedData

Public Types

typedef QExplicitlySharedDataPointer< ValueConstraintPtr
 
enum  Variety { Default, Fixed }
 

Public Functions

QString lexicalForm () const
 
void setLexicalForm (const QString &form)
 
void setValue (const QString &value)
 
void setVariety (Variety variety)
 
QString value () const
 
Variety variety () const
 
- 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...
 

Static Public Functions

static ValueConstraint::Ptr fromAttributeValueConstraint (const XsdAttribute::ValueConstraint::Ptr &constraint)
 

Properties

QString m_lexicalForm
 
QString m_value
 
Variety m_variety
 

Additional Inherited Members

- Public Variables inherited from QSharedData
QAtomicInt ref
 

Detailed Description

Describes the value constraint of an attribute use.

See also
Value Constraint Definition

Definition at line 92 of file qxsdattributeuse_p.h.

Typedefs

◆ Ptr

Definition at line 95 of file qxsdattributeuse_p.h.

Enumerations

◆ Variety

Describes the value constraint of an attribute use.

Enumerator
Default 

The attribute use has a default value set.

Fixed 

The attribute use has a fixed value set.

Definition at line 100 of file qxsdattributeuse_p.h.

101  {
102  Default,
103  Fixed
104  };
The attribute use has a fixed value set.
The attribute use has a default value set.

Functions

◆ fromAttributeValueConstraint()

XsdAttributeUse::ValueConstraint::Ptr XsdAttributeUse::ValueConstraint::fromAttributeValueConstraint ( const XsdAttribute::ValueConstraint::Ptr constraint)
static

Creates a new value constraint from a XsdAttribute::ValueConstraint.

Definition at line 78 of file qxsdattributeuse.cpp.

Referenced by QPatternist::XsdSchemaHelper::isValidAttributeUsesRestriction(), and QPatternist::XsdSchemaResolver::resolveAttributeTermReferences().

79 {
81  switch (constraint->variety()) {
82  case XsdAttribute::ValueConstraint::Fixed: newConstraint->setVariety(Fixed); break;
83  case XsdAttribute::ValueConstraint::Default: newConstraint->setVariety(Default); break;
84  }
85  newConstraint->setValue(constraint->value());
86  newConstraint->setLexicalForm(constraint->lexicalForm());
87 
88  return newConstraint;
89 }
The attribute has a default value set.
The attribute use has a fixed value set.
The attribute use has a default value set.
The attribute has a fixed value set.

◆ lexicalForm()

QString XsdAttributeUse::ValueConstraint::lexicalForm ( ) const

Returns the lexical form of the constraint.

Definition at line 73 of file qxsdattributeuse.cpp.

◆ setLexicalForm()

void XsdAttributeUse::ValueConstraint::setLexicalForm ( const QString form)

Sets the lexical form of the constraint.

Definition at line 68 of file qxsdattributeuse.cpp.

◆ setValue()

void XsdAttributeUse::ValueConstraint::setValue ( const QString value)

Sets the value of the constraint.

Definition at line 58 of file qxsdattributeuse.cpp.

◆ setVariety()

void XsdAttributeUse::ValueConstraint::setVariety ( Variety  variety)

Sets the variety of the attribute use value constraint.

Definition at line 48 of file qxsdattributeuse.cpp.

◆ value()

QString XsdAttributeUse::ValueConstraint::value ( ) const

Returns the value of the constraint.

Definition at line 63 of file qxsdattributeuse.cpp.

Referenced by setValue().

◆ variety()

XsdAttributeUse::ValueConstraint::Variety XsdAttributeUse::ValueConstraint::variety ( ) const

Returns the variety of the attribute use value constraint.

Definition at line 53 of file qxsdattributeuse.cpp.

Referenced by setVariety().

Properties

◆ m_lexicalForm

QString QPatternist::XsdAttributeUse::ValueConstraint::m_lexicalForm
private

Definition at line 144 of file qxsdattributeuse_p.h.

Referenced by lexicalForm(), and setLexicalForm().

◆ m_value

QString QPatternist::XsdAttributeUse::ValueConstraint::m_value
private

Definition at line 143 of file qxsdattributeuse_p.h.

Referenced by setValue(), and value().

◆ m_variety

Variety QPatternist::XsdAttributeUse::ValueConstraint::m_variety
private

Definition at line 142 of file qxsdattributeuse_p.h.

Referenced by setVariety(), and variety().


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