Qt 4.8
qxsdelement.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 "qxsdelement_p.h"
43 
45 
46 using namespace QPatternist;
47 
49 {
51 }
52 
54 {
55  return m_variety;
56 }
57 
59 {
60  m_parent = parent.data();
61 }
62 
64 {
66 }
67 
69 {
71 }
72 
74 {
75  return m_variety;
76 }
77 
79 {
80  m_value = value;
81 }
82 
84 {
85  return m_value;
86 }
87 
89 {
90  m_lexicalForm = form;
91 }
92 
94 {
95  return m_lexicalForm;
96 }
97 
99 {
100  m_alternatives.append(alternative);
101 }
102 
104 {
105  return m_alternatives;
106 }
107 
109 {
110  m_defaultTypeDefinition = type;
111 }
112 
114 {
115  return m_defaultTypeDefinition;
116 }
117 
118 
120  : m_isAbstract(false)
121 {
122 }
123 
125 {
126  return true;
127 }
128 
130 {
131  m_type = type.data();
132 }
133 
135 {
136  return SchemaType::Ptr(m_type);
137 }
138 
140 {
141  m_scope = scope;
142 }
143 
145 {
146  return m_scope;
147 }
148 
150 {
151  m_valueConstraint = constraint;
152 }
153 
155 {
156  return m_valueConstraint;
157 }
158 
160 {
161  m_typeTable = table;
162 }
163 
165 {
166  return m_typeTable;
167 }
168 
169 void XsdElement::setIsAbstract(bool abstract)
170 {
171  m_isAbstract = abstract;
172 }
173 
175 {
176  return m_isAbstract;
177 }
178 
179 void XsdElement::setIsNillable(bool nillable)
180 {
181  m_isNillable = nillable;
182 }
183 
185 {
186  return m_isNillable;
187 }
188 
189 void XsdElement::setDisallowedSubstitutions(const BlockingConstraints &substitutions)
190 {
191  m_disallowedSubstitutions = substitutions;
192 }
193 
194 XsdElement::BlockingConstraints XsdElement::disallowedSubstitutions() const
195 {
197 }
198 
199 void XsdElement::setSubstitutionGroupExclusions(const SchemaType::DerivationConstraints &exclusions)
200 {
201  m_substitutionGroupExclusions = exclusions;
202 }
203 
204 SchemaType::DerivationConstraints XsdElement::substitutionGroupExclusions() const
205 {
207 }
208 
210 {
211  m_identityConstraints = constraints;
212 }
213 
215 {
216  m_identityConstraints.append(constraint);
217 }
218 
220 {
221  return m_identityConstraints;
222 }
223 
225 {
226  m_substitutionGroupAffiliations = affiliations;
227 }
228 
230 {
232 }
233 
235 {
236  m_substitutionGroups.insert(element.data());
237 }
238 
240 {
241  return m_substitutionGroups.toList();
242 }
243 
TypeTable::Ptr typeTable() const
void addSubstitutionGroup(const XsdElement::Ptr &elements)
QExplicitlySharedDataPointer< NamedSchemaComponent > Ptr
XsdElement::WeakList substitutionGroups() const
void setSubstitutionGroupAffiliations(const XsdElement::List &affiliations)
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
XsdIdentityConstraint::List identityConstraints() const
XsdAlternative::List alternatives() const
The QExplicitlySharedDataPointer class represents a pointer to an explicitly shared object...
Definition: qshareddata.h:136
void addIdentityConstraint(const XsdIdentityConstraint::Ptr &constraint)
BlockingConstraints m_disallowedSubstitutions
XsdElement::List substitutionGroupAffiliations() const
XsdElement::List m_substitutionGroupAffiliations
The QString class provides a Unicode character string.
Definition: qstring.h:83
void setSubstitutionGroupExclusions(const SchemaType::DerivationConstraints &exclusions)
SchemaType::Ptr type() const
XsdAlternative::Ptr defaultTypeDefinition() 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
SchemaType::DerivationConstraints m_substitutionGroupExclusions
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
void setValue(const QString &value)
Definition: qxsdelement.cpp:78
void setDefaultTypeDefinition(const XsdAlternative::Ptr &type)
SchemaType::DerivationConstraints substitutionGroupExclusions() const
The namespace for the internal API of QtXmlPatterns.
void setIdentityConstraints(const XsdIdentityConstraint::List &constraints)
XsdIdentityConstraint::List m_identityConstraints
void setIsAbstract(bool abstract)
void setType(const SchemaType::Ptr &type)
void setVariety(Variety variety)
Definition: qxsdelement.cpp:48
ValueConstraint::Ptr m_valueConstraint
void setDisallowedSubstitutions(const BlockingConstraints &substitutions)
void setIsNillable(bool nillable)
void setScope(const Scope::Ptr &scope)
virtual bool isElement() const
void setLexicalForm(const QString &form)
Definition: qxsdelement.cpp:88
TypeTable::Ptr m_typeTable
ValueConstraint::Ptr valueConstraint() const
QExplicitlySharedDataPointer< SchemaType > Ptr
Definition: qschematype_p.h:82
BlockingConstraints disallowedSubstitutions() const
void addAlternative(const XsdAlternative::Ptr &alternative)
Definition: qxsdelement.cpp:98
QSet< XsdElement * > m_substitutionGroups
NamedSchemaComponent::Ptr parent() const
Definition: qxsdelement.cpp:63
NamedSchemaComponent * m_parent
void setTypeTable(const TypeTable::Ptr &table)
void setValueConstraint(const ValueConstraint::Ptr &constraint)
Scope::Ptr scope() const
void setParent(const NamedSchemaComponent::Ptr &parent)
Definition: qxsdelement.cpp:58