Qt 4.8
qxsdschema_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_XsdSchema_H
53 #define Patternist_XsdSchema_H
54 
55 #include "qschematype_p.h"
56 #include "qxsdannotated_p.h"
57 #include "qxsdattribute_p.h"
58 #include "qxsdattributegroup_p.h"
59 #include "qxsdcomplextype_p.h"
60 #include "qxsdelement_p.h"
62 #include "qxsdmodelgroup_p.h"
63 #include "qxsdnotation_p.h"
64 #include "qxsdsimpletype_p.h"
65 
66 #include <QtCore/QHash>
67 #include <QtCore/QReadWriteLock>
68 
74 
76 
77 namespace QPatternist
78 {
91  class XsdSchema : public QSharedData, public XsdAnnotated
92  {
93  public:
96 
104 
108  ~XsdSchema();
109 
114  NamePool::Ptr namePool() const;
115 
120 
124  QString targetNamespace() const;
125 
132  void addElement(const XsdElement::Ptr &element);
133 
138  XsdElement::Ptr element(const QXmlName &name) const;
139 
143  XsdElement::List elements() const;
144 
152 
158 
163 
172  void addType(const SchemaType::Ptr &type);
173 
178  SchemaType::Ptr type(const QXmlName &name) const;
179 
183  SchemaType::List types() const;
184 
189 
194 
203 
208 
215  void addAttributeGroup(const XsdAttributeGroup::Ptr &group);
216 
222 
227 
234  void addElementGroup(const XsdModelGroup::Ptr &group);
235 
241 
246 
254 
259  XsdNotation::Ptr notation(const QXmlName &name) const;
260 
265 
269  void addIdentityConstraint(const XsdIdentityConstraint::Ptr &constraint);
270 
276 
281 
282  private:
294  };
295 }
296 
298 
300 
301 #endif
void addElement(const XsdElement::Ptr &element)
Definition: qxsdschema.cpp:75
QHash< QXmlName, XsdIdentityConstraint::Ptr > m_identityConstraints
Definition: qxsdschema_p.h:292
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
XsdElement::Ptr element(const QXmlName &name) const
Definition: qxsdschema.cpp:82
XsdAttributeGroup::Ptr attributeGroup(const QXmlName name) const
Definition: qxsdschema.cpp:195
#define QT_BEGIN_HEADER
Definition: qglobal.h:136
XsdIdentityConstraint::Ptr identityConstraint(const QXmlName &name) const
Definition: qxsdschema.cpp:258
void addAttributeGroup(const XsdAttributeGroup::Ptr &group)
Definition: qxsdschema.cpp:188
QHash< QXmlName, XsdAttributeGroup::Ptr > m_attributeGroups
Definition: qxsdschema_p.h:289
Represents a XSD schema object.
Definition: qxsdschema_p.h:91
SchemaType::List anonymousTypes() const
Definition: qxsdschema.cpp:181
XsdSimpleType::List simpleTypes() const
Definition: qxsdschema.cpp:138
The QString class provides a Unicode character string.
Definition: qstring.h:83
The QHash class is a template class that provides a hash-table-based dictionary.
Definition: qdatastream.h:66
XsdModelGroup::List elementGroups() const
Definition: qxsdschema.cpp:223
QHash< QXmlName, XsdModelGroup::Ptr > m_elementGroups
Definition: qxsdschema_p.h:290
QHash< QXmlName, XsdNotation::Ptr > m_notations
Definition: qxsdschema_p.h:291
Base class for all XSD components with annotation content.
void addIdentityConstraint(const XsdIdentityConstraint::Ptr &constraint)
Definition: qxsdschema.cpp:251
QHash< QXmlName, XsdElement::Ptr > m_elements
Definition: qxsdschema_p.h:285
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
QList< XsdSchema::Ptr > List
Definition: qxsdschema_p.h:95
void addNotation(const XsdNotation::Ptr &notation)
Definition: qxsdschema.cpp:230
NamePool::Ptr m_namePool
Definition: qxsdschema_p.h:283
const char * name
XsdIdentityConstraint::List identityConstraints() const
Definition: qxsdschema.cpp:265
XsdModelGroup::Ptr elementGroup(const QXmlName &name) const
Definition: qxsdschema.cpp:216
XsdNotation::Ptr notation(const QXmlName &name) const
Definition: qxsdschema.cpp:237
The namespace for the internal API of QtXmlPatterns.
QHash< QXmlName, SchemaType::Ptr > m_types
Definition: qxsdschema_p.h:287
XsdNotation::List notations() const
Definition: qxsdschema.cpp:244
QHash< QXmlName, XsdAttribute::Ptr > m_attributes
Definition: qxsdschema_p.h:286
QExplicitlySharedDataPointer< XsdSchema > Ptr
Definition: qxsdschema_p.h:94
XsdComplexType::List complexTypes() const
Definition: qxsdschema.cpp:153
SchemaType::Ptr type(const QXmlName &name) const
Definition: qxsdschema.cpp:124
The QXmlName class represents the name of an XML node, in an efficient, namespace-aware way...
Definition: qxmlname.h:58
The QSharedData class is a base class for shared data objects.
Definition: qshareddata.h:56
The QReadWriteLock class provides read-write locking.
void addAnonymousType(const SchemaType::Ptr &type)
Definition: qxsdschema.cpp:168
XsdAttribute::List attributes() const
Definition: qxsdschema.cpp:110
QHash< QXmlName, SchemaType::Ptr > m_anonymousTypes
Definition: qxsdschema_p.h:288
XsdSchema(const NamePool::Ptr &namePool)
Definition: qxsdschema.cpp:51
void setTargetNamespace(const QString &targetNamespace)
Definition: qxsdschema.cpp:65
XsdAttribute::Ptr attribute(const QXmlName &name) const
Definition: qxsdschema.cpp:103
void addElementGroup(const XsdModelGroup::Ptr &group)
Definition: qxsdschema.cpp:209
XsdAttributeGroup::List attributeGroups() const
Definition: qxsdschema.cpp:202
QString targetNamespace() const
Definition: qxsdschema.cpp:70
void addType(const SchemaType::Ptr &type)
Definition: qxsdschema.cpp:117
SchemaType::List types() const
Definition: qxsdschema.cpp:131
#define QT_END_HEADER
Definition: qglobal.h:137
XsdElement::List elements() const
Definition: qxsdschema.cpp:89
void addAttribute(const XsdAttribute::Ptr &attribute)
Definition: qxsdschema.cpp:96
NamePool::Ptr namePool() const
Definition: qxsdschema.cpp:60
The QList class is a template class that provides lists.
Definition: qdatastream.h:62
QReadWriteLock m_lock
Definition: qxsdschema_p.h:293