Qt 4.8
qxsdcomplextype_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_XsdComplexType_H
53 #define Patternist_XsdComplexType_H
54 
55 #include "qanytype_p.h"
56 #include "qxsdassertion_p.h"
57 #include "qxsdattributeuse_p.h"
58 #include "qxsdparticle_p.h"
59 #include "qxsdsimpletype_p.h"
60 #include "qxsduserschematype_p.h"
61 #include "qxsdwildcard_p.h"
62 
63 #include <QtCore/QSet>
64 
66 
68 
69 namespace QPatternist
70 {
84  class XsdComplexType : public XsdUserSchemaType<AnyType>
85  {
86  public:
88 
94  class OpenContent : public QSharedData, public XsdAnnotated
95  {
96  public:
98 
104  enum Mode
105  {
109  };
110 
116  void setMode(Mode mode);
117 
121  Mode mode() const;
122 
129 
133  XsdWildcard::Ptr wildcard() const;
134 
135  private:
138  };
139 
143  class ContentType : public QSharedData
144  {
145  public:
147 
151  enum Variety
152  {
153  Empty = 0,
156  Mixed
157  };
158 
164  void setVariety(Variety variety);
165 
169  Variety variety() const;
170 
180  void setParticle(const XsdParticle::Ptr &particle);
181 
187  XsdParticle::Ptr particle() const;
188 
198  void setOpenContent(const OpenContent::Ptr &content);
199 
205  OpenContent::Ptr openContent() const;
206 
215  void setSimpleType(const AnySimpleType::Ptr &type);
216 
221  AnySimpleType::Ptr simpleType() const;
222 
223  private:
228  };
229 
230 
234  XsdComplexType();
235 
240 
249  virtual QString displayName(const NamePool::Ptr &namePool) const;
250 
256  void setWxsSuperType(const SchemaType::Ptr &type);
257 
261  virtual SchemaType::Ptr wxsSuperType() const;
262 
269 
274 
285 
289  virtual DerivationMethod derivationMethod() const;
290 
296  void setIsAbstract(bool abstract);
297 
301  virtual bool isAbstract() const;
302 
308  void setAttributeUses(const XsdAttributeUse::List &uses);
309 
313  void addAttributeUse(const XsdAttributeUse::Ptr &use);
314 
319 
326 
331 
335  virtual TypeCategory category() const;
336 
342  void setContentType(const ContentType::Ptr &type);
343 
348 
356  void setProhibitedSubstitutions(const BlockingConstraints &substitutions);
357 
361  BlockingConstraints prohibitedSubstitutions() const;
362 
369 
375  void addAssertion(const XsdAssertion::Ptr &assertion);
376 
381 
385  virtual bool isDefinedBySchema() const;
386 
387  private:
395  BlockingConstraints m_prohibitedSubstitutions;
397  };
398 }
399 
401 
403 
404 #endif
Describes the content type of a complex type.
XsdAttributeUse::List m_attributeUses
int type
Definition: qmetatype.cpp:239
void setAssertions(const XsdAssertion::List &assertions)
Base class for W3C XML Schema types.
Definition: qschematype_p.h:78
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
virtual QString displayName(const NamePool::Ptr &namePool) const
NamedSchemaComponent * m_context
#define QT_BEGIN_HEADER
Definition: qglobal.h:136
virtual TypeCategory category() const
void setContext(const NamedSchemaComponent::Ptr &component)
void setAttributeUses(const XsdAttributeUse::List &uses)
NamedSchemaComponent::Ptr context() const
void setIsAbstract(bool abstract)
Represents a XSD complexType object.
The QString class provides a Unicode character string.
Definition: qstring.h:83
XsdAttributeUse::List attributeUses() const
ContentType::Ptr contentType() const
XsdWildcard::Ptr attributeWildcard() const
virtual SchemaType::Ptr wxsSuperType() const
Base class for all XSD components with annotation content.
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
XsdAssertion::List m_assertions
void setWildcard(const XsdWildcard::Ptr &wildcard)
virtual bool isDefinedBySchema() const
QExplicitlySharedDataPointer< ContentType > Ptr
The namespace for the internal API of QtXmlPatterns.
void setDerivationMethod(DerivationMethod method)
void addAttributeUse(const XsdAttributeUse::Ptr &use)
static qreal component(const QPointF &point, unsigned int i)
QExplicitlySharedDataPointer< OpenContent > Ptr
void addAssertion(const XsdAssertion::Ptr &assertion)
void setWxsSuperType(const SchemaType::Ptr &type)
The complex type has only simple type content (e.g. text, number etc.)
XsdWildcard::Ptr m_attributeWildcard
virtual DerivationMethod derivationMethod() const
The QSharedData class is a base class for shared data objects.
Definition: qshareddata.h:56
void setAttributeWildcard(const XsdWildcard::Ptr &wildcard)
BlockingConstraints m_prohibitedSubstitutions
void setContentType(const ContentType::Ptr &type)
DerivationMethod m_derivationMethod
A base class for all user defined simple and complex types.
QExplicitlySharedDataPointer< XsdComplexType > Ptr
void setProhibitedSubstitutions(const BlockingConstraints &substitutions)
BlockingConstraints prohibitedSubstitutions() const
virtual bool isAbstract() const
The complex type has further elements or attributes but no text as content.
#define QT_END_HEADER
Definition: qglobal.h:137
Base class for all named components that can appear in a W3C XML Schema.
Describes the open content object of a complex type.
XsdAssertion::List assertions() const