Qt 4.8
qxsdcomplextype.cpp
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 #include "qxsdcomplextype_p.h"
43 
45 
46 using namespace QPatternist;
47 
49 {
50  m_mode = mode;
51 }
52 
54 {
55  return m_mode;
56 }
57 
59 {
61 }
62 
64 {
65  return m_wildcard;
66 }
67 
69 {
70  m_variety = variety;
71 }
72 
74 {
75  return m_variety;
76 }
77 
79 {
80  m_particle = particle;
81 }
82 
84 {
85  return m_particle;
86 }
87 
89 {
90  m_openContent = content;
91 }
92 
94 {
95  return m_openContent;
96 }
97 
99 {
100  m_simpleType = type;
101 }
102 
104 {
105  return m_simpleType;
106 }
107 
108 
110  : m_isAbstract(false)
111  , m_contentType(new ContentType())
112 {
114 }
115 
116 void XsdComplexType::setIsAbstract(bool abstract)
117 {
118  m_isAbstract = abstract;
119 }
120 
122 {
123  return m_isAbstract;
124 }
125 
127 {
128  return np->displayName(name(np));
129 }
130 
132 {
133  m_superType = type.data();
134 }
135 
137 {
139 }
140 
142 {
143  m_context = component.data();
144 }
145 
147 {
149 }
150 
152 {
154 }
155 
157 {
158  return m_contentType;
159 }
160 
162 {
164 }
165 
167 {
168  m_attributeUses.append(attributeUse);
169 }
170 
172 {
173  return m_attributeUses;
174 }
175 
177 {
178  m_attributeWildcard = wildcard;
179 }
180 
182 {
183  return m_attributeWildcard;
184 }
185 
187 {
188  return ComplexType;
189 }
190 
192 {
193  m_derivationMethod = method;
194 }
195 
197 {
198  return m_derivationMethod;
199 }
200 
201 void XsdComplexType::setProhibitedSubstitutions(const BlockingConstraints &substitutions)
202 {
203  m_prohibitedSubstitutions = substitutions;
204 }
205 
206 XsdComplexType::BlockingConstraints XsdComplexType::prohibitedSubstitutions() const
207 {
209 }
210 
212 {
214 }
215 
217 {
218  m_assertions.append(assertion);
219 }
220 
222 {
223  return m_assertions;
224 }
225 
227 {
228  return true;
229 }
230 
Describes the content type of a complex type.
QString displayName(const QXmlName qName) const
Definition: qnamepool.cpp:347
QExplicitlySharedDataPointer< NamedSchemaComponent > Ptr
XsdAttributeUse::List m_attributeUses
int type
Definition: qmetatype.cpp:239
void setSimpleType(const AnySimpleType::Ptr &type)
void setAssertions(const XsdAssertion::List &assertions)
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
virtual QString displayName(const NamePool::Ptr &namePool) const
NamedSchemaComponent * m_context
virtual TypeCategory category() const
void setContext(const NamedSchemaComponent::Ptr &component)
void setAttributeUses(const XsdAttributeUse::List &uses)
NamedSchemaComponent::Ptr context() const
void setIsAbstract(bool abstract)
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
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
T * data() const
Returns a pointer to the shared data object.
Definition: qshareddata.h:145
#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
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)
void addAssertion(const XsdAssertion::Ptr &assertion)
void setWxsSuperType(const SchemaType::Ptr &type)
void setParticle(const XsdParticle::Ptr &particle)
XsdWildcard::Ptr m_attributeWildcard
virtual DerivationMethod derivationMethod() const
void setAttributeWildcard(const XsdWildcard::Ptr &wildcard)
BlockingConstraints m_prohibitedSubstitutions
void setContentType(const ContentType::Ptr &type)
DerivationMethod m_derivationMethod
QExplicitlySharedDataPointer< SchemaType > Ptr
Definition: qschematype_p.h:82
void setProhibitedSubstitutions(const BlockingConstraints &substitutions)
void setOpenContent(const OpenContent::Ptr &content)
BlockingConstraints prohibitedSubstitutions() const
virtual bool isAbstract() const
The complex type has no further content.
virtual QXmlName name(const NamePool::Ptr &namePool) const
XsdAssertion::List assertions() const