Qt 4.8
qxsdattribute_p.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtXmlPatterns module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 //
43 // W A R N I N G
44 // -------------
45 //
46 // This file is not part of the Qt API. It exists purely as an
47 // implementation detail. This header file may change from version to
48 // version without notice, or even be removed.
49 //
50 // We mean it.
51 
52 #ifndef Patternist_XsdAttribute_H
53 #define Patternist_XsdAttribute_H
54 
55 #include "qanysimpletype_p.h"
57 #include "qxsdannotated_p.h"
58 
59 #include <QtCore/QList>
60 
62 
64 
65 namespace QPatternist
66 {
84  {
85  public:
88 
94  class Scope : public QSharedData
95  {
96  public:
98 
102  enum Variety
103  {
106  };
107 
113  void setVariety(Variety variety);
114 
118  Variety variety() const;
119 
126 
131 
132  private:
135  };
136 
137 
144  {
145  public:
147 
151  enum Variety
152  {
154  Fixed
155  };
156 
162  void setVariety(Variety variety);
163 
167  Variety variety() const;
168 
174  void setValue(const QString &value);
175 
179  QString value() const;
180 
186  void setLexicalForm(const QString &form);
187 
191  QString lexicalForm() const;
192 
193  private:
197  };
198 
204  void setType(const AnySimpleType::Ptr &type);
205 
209  AnySimpleType::Ptr type() const;
210 
216  void setScope(const Scope::Ptr &scope);
217 
221  Scope::Ptr scope() const;
222 
228  void setValueConstraint(const ValueConstraint::Ptr &constraint);
229 
234 
235  private:
239  };
240 }
241 
243 
245 
246 #endif
NamedSchemaComponent * m_parent
Represents a XSD attribute object.
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
The attribute has a default value set.
#define QT_BEGIN_HEADER
Definition: qglobal.h:136
void setParent(const NamedSchemaComponent::Ptr &parent)
Scope::Ptr scope() const
ValueConstraint::Ptr valueConstraint() const
QList< XsdAttribute::Ptr > List
AnySimpleType::Ptr m_type
The QString class provides a Unicode character string.
Definition: qstring.h:83
QExplicitlySharedDataPointer< ValueConstraint > Ptr
void setType(const AnySimpleType::Ptr &type)
Base class for all XSD components with annotation content.
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
AnySimpleType::Ptr type() const
The namespace for the internal API of QtXmlPatterns.
Describes the value constraint of an attribute.
QExplicitlySharedDataPointer< Scope > Ptr
The QSharedData class is a base class for shared data objects.
Definition: qshareddata.h:56
Describes the scope of an attribute.
void setScope(const Scope::Ptr &scope)
void setValueConstraint(const ValueConstraint::Ptr &constraint)
The attribute is defined locally as child of a complex type or attribute group definition.
NamedSchemaComponent::Ptr parent() const
ValueConstraint::Ptr m_valueConstraint
The attribute is defined globally as child of the schema object.
#define QT_END_HEADER
Definition: qglobal.h:137
void setVariety(Variety variety)
Base class for all named components that can appear in a W3C XML Schema.
QExplicitlySharedDataPointer< XsdAttribute > Ptr
The QList class is a template class that provides lists.
Definition: qdatastream.h:62