Update licenseheader text in source files for qtxmlpatterns Qt module
[profile/ivi/qtxmlpatterns.git] / src / xmlpatterns / type / qcommonsequencetypes_p.h
1 /****************************************************************************
2 **
3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: Nokia Corporation (qt-info@nokia.com)
6 **
7 ** This file is part of the QtXmlPatterns module of the Qt Toolkit.
8 **
9 ** $QT_BEGIN_LICENSE:LGPL$
10 ** GNU Lesser General Public License Usage
11 ** This file may be used under the terms of the GNU Lesser General Public
12 ** License version 2.1 as published by the Free Software Foundation and
13 ** appearing in the file LICENSE.LGPL included in the packaging of this
14 ** file. Please review the following information to ensure the GNU Lesser
15 ** General Public License version 2.1 requirements will be met:
16 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
17 **
18 ** In addition, as a special exception, Nokia gives you certain additional
19 ** rights. These rights are described in the Nokia Qt LGPL Exception
20 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
21 **
22 ** GNU General Public License Usage
23 ** Alternatively, this file may be used under the terms of the GNU General
24 ** Public License version 3.0 as published by the Free Software Foundation
25 ** and appearing in the file LICENSE.GPL included in the packaging of this
26 ** file. Please review the following information to ensure the GNU General
27 ** Public License version 3.0 requirements will be met:
28 ** http://www.gnu.org/copyleft/gpl.html.
29 **
30 ** Other Usage
31 ** Alternatively, this file may be used in accordance with the terms and
32 ** conditions contained in a signed written agreement between you and Nokia.
33 **
34 **
35 **
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_CommonSequenceTypes_H
53 #define Patternist_CommonSequenceTypes_H
54
55 #include "qemptysequencetype_p.h"
56 #include "qnonetype_p.h"
57
58 QT_BEGIN_HEADER
59
60 QT_BEGIN_NAMESPACE
61
62 namespace QPatternist
63 {
64     /**
65      * @short Provides access to singleton instances of SequenceType sub-classes.
66      *
67      * @ingroup Patternist_types
68      * @author Frans Englich <frans.englich@nokia.com>
69      */
70     class Q_AUTOTEST_EXPORT CommonSequenceTypes
71     {
72     public:
73         /**
74          * <tt>xs:anyAtomicType?</tt>
75          */
76         static const SequenceType::Ptr ZeroOrOneAtomicType;
77
78         /**
79          * <tt>xs:anyAtomicType</tt>
80          */
81         static const SequenceType::Ptr ExactlyOneAtomicType;
82
83         /**
84          * <tt>xs:anyAtomicType*</tt>
85          */
86         static const SequenceType::Ptr ZeroOrMoreAtomicTypes;
87
88         /**
89          * <tt>item()</tt>
90          */
91         static const SequenceType::Ptr ExactlyOneItem;
92
93         /**
94          * <tt>item()*</tt>
95          */
96         static const SequenceType::Ptr ZeroOrMoreItems;
97
98         /**
99          * <tt>item()?</tt>
100          */
101         static const SequenceType::Ptr ZeroOrOneItem;
102
103         /**
104          * <tt>item()+</tt>
105          */
106         static const SequenceType::Ptr OneOrMoreItems;
107
108         /**
109          * The empty sequence, <tt>empty-sequence()</tt>.
110          */
111         static const EmptySequenceType::Ptr Empty;
112
113         /**
114          * The special type @c none. Used for the function <tt>fn:error()</tt>, for example.
115          */
116         static const NoneType::Ptr None;
117
118         /**
119          * <tt>xs:anyURI</tt>
120          */
121         static const SequenceType::Ptr ExactlyOneAnyURI;
122
123         /**
124          * <tt>xs:boolean</tt>
125          */
126         static const SequenceType::Ptr ExactlyOneBoolean;
127
128         /**
129          * <tt>xs:boolean?</tt>
130          */
131         static const SequenceType::Ptr ZeroOrOneBoolean;
132
133         /**
134          * <tt>xs:untypedAtomic</tt>
135          */
136         static const SequenceType::Ptr ExactlyOneUntypedAtomic;
137
138         /**
139          * <tt>xs:integer</tt>
140          */
141         static const SequenceType::Ptr ExactlyOneInteger;
142
143         /**
144          * <tt>xs:integer?</tt>
145          */
146         static const SequenceType::Ptr ZeroOrOneInteger;
147
148         /**
149          * <tt>xs:decimal?</tt>
150          */
151         static const SequenceType::Ptr ZeroOrOneDecimal;
152
153         /**
154          * <tt>xs:integer*</tt>
155          */
156         static const SequenceType::Ptr ZeroOrMoreIntegers;
157
158         /**
159          * <tt>xs:double</tt>
160          */
161         static const SequenceType::Ptr ExactlyOneDouble;
162
163         /**
164          * <tt>xs:decimal</tt>
165          */
166         static const SequenceType::Ptr ExactlyOneDecimal;
167
168         /**
169          * <tt>xs:float</tt>
170          */
171         static const SequenceType::Ptr ExactlyOneFloat;
172
173         /**
174          * <tt>xs:QName</tt>
175          */
176         static const SequenceType::Ptr ExactlyOneQName;
177
178         /**
179          * <tt>xs:string</tt>
180          */
181         static const SequenceType::Ptr ExactlyOneString;
182
183         /**
184          * <tt>xs:string?</tt>
185          */
186         static const SequenceType::Ptr ZeroOrOneString;
187
188         /**
189          * <tt>xs:string*</tt>
190          */
191         static const SequenceType::Ptr ZeroOrMoreStrings;
192
193         /**
194          * <tt>xs:NCName?</tt>
195          */
196         static const SequenceType::Ptr ZeroOrOneNCName;
197
198         /**
199          * <tt>xs:NCName</tt>
200          */
201         static const SequenceType::Ptr ExactlyOneNCName;
202
203         /**
204          * <tt>xs:QName?</tt>
205          */
206         static const SequenceType::Ptr ZeroOrOneQName;
207
208         /**
209          * The artificial type in XPath 2.0 that covers @c xs:double, @c xs:float,
210          * @c xs:decimal, with cardinality zero or one.
211          *
212          * @see <a href="http://www.w3.org/TR/xpath20/#dt-numeric">XML Path Language
213          * (XPath) 2.0, definition for Numeric</a>
214          * @see <a href="http://www.w3.org/TR/xpath-functions/#func-signatures">XQuery 1.0
215          * and XPath 2.0 Functions and Operators, 1.3 Function Signatures and Descriptions</a>
216          * @see BuiltinTypes::numeric
217          */
218         static const SequenceType::Ptr ZeroOrOneNumeric;
219
220         /**
221          * @c numeric
222          */
223         static const SequenceType::Ptr ExactlyOneNumeric;
224
225         /**
226          * <tt>node()?</tt>
227          */
228         static const SequenceType::Ptr ZeroOrOneNode;
229
230         /**
231          * <tt>node()</tt>
232          */
233         static const SequenceType::Ptr ExactlyOneNode;
234
235         /**
236          * <tt>node()*</tt>
237          */
238         static const SequenceType::Ptr ZeroOrMoreNodes;
239
240         /**
241          * <tt>element()</tt>
242          */
243         static const SequenceType::Ptr ExactlyOneElement;
244
245         /**
246          * <tt>processing-instruction()</tt>
247          */
248         static const SequenceType::Ptr ExactlyOneProcessingInstruction;
249
250         /**
251          * <tt>attribute()</tt>
252          */
253         static const SequenceType::Ptr ExactlyOneAttribute;
254
255         /**
256          * <tt>text()</tt>
257          */
258         static const SequenceType::Ptr ExactlyOneTextNode;
259
260         /**
261          * <tt>text()?</tt>
262          */
263         static const SequenceType::Ptr ZeroOrOneTextNode;
264
265         /**
266          * <tt>comment()</tt>
267          */
268         static const SequenceType::Ptr ExactlyOneComment;
269
270         /**
271          * <tt>element()*</tt>
272          */
273         static const SequenceType::Ptr ZeroOrMoreElements;
274
275         /**
276          * <tt>document-node()?</tt>
277          */
278         static const SequenceType::Ptr ZeroOrOneDocumentNode;
279
280         /**
281          * <tt>document-node()</tt>
282          */
283         static const SequenceType::Ptr ExactlyOneDocumentNode;
284
285         /**
286          * <tt>document-node()+</tt>
287          */
288         static const SequenceType::Ptr OneOrMoreDocumentNodes;
289
290         /**
291          * Identifiers all values which the Effective %Boolean Value
292          * can be extracted from.
293          */
294         static const SequenceType::Ptr EBV;
295
296         /**
297          * <tt>xs:anyURI?</tt>
298          */
299         static const SequenceType::Ptr ZeroOrOneAnyURI;
300
301         /**
302          * <tt>xs:hexBinary</tt>
303          */
304         static const SequenceType::Ptr ExactlyOneHexBinary;
305
306         /**
307          * <tt>xs:base64Binary</tt>
308          */
309         static const SequenceType::Ptr ExactlyOneBase64Binary;
310
311         /**
312          * <tt>xs:date</tt>
313          */
314         static const SequenceType::Ptr ExactlyOneDate;
315
316         /**
317          * <tt>xs:dateTime</tt>
318          */
319         static const SequenceType::Ptr ExactlyOneDateTime;
320
321         /**
322          * <tt>xs:dayTimeDuration</tt>
323          */
324         static const SequenceType::Ptr ExactlyOneDayTimeDuration;
325
326         /**
327          * <tt>xs:duration</tt>
328          */
329         static const SequenceType::Ptr ExactlyOneDuration;
330
331         /**
332          * <tt>xs:gDay</tt>
333          */
334         static const SequenceType::Ptr ExactlyOneGDay;
335
336         /**
337          * <tt>xs:gMonth</tt>
338          */
339         static const SequenceType::Ptr ExactlyOneGMonth;
340
341         /**
342          * <tt>xs:gMonthDay</tt>
343          */
344         static const SequenceType::Ptr ExactlyOneGMonthDay;
345
346         /**
347          * <tt>xs:gYear</tt>
348          */
349         static const SequenceType::Ptr ExactlyOneGYear;
350
351         /**
352          * <tt>xs:gYearMonth</tt>
353          */
354         static const SequenceType::Ptr ExactlyOneGYearMonth;
355
356         /**
357          * <tt>xs:yearMonthDuration</tt>
358          */
359         static const SequenceType::Ptr ExactlyOneYearMonthDuration;
360
361         /**
362          * <tt>xs:time</tt>
363          */
364         static const SequenceType::Ptr ExactlyOneTime;
365
366         /**
367          * <tt>xs:time?</tt>
368          */
369         static const SequenceType::Ptr ZeroOrOneDate;
370
371         /**
372          * <tt>xs:dateTime?</tt>
373          */
374         static const SequenceType::Ptr ZeroOrOneDateTime;
375
376         /**
377          * <tt>xs:dayTimeDuration?</tt>
378          */
379         static const SequenceType::Ptr ZeroOrOneDayTimeDuration;
380
381         /**
382          * <tt>xs:duration?</tt>
383          */
384         static const SequenceType::Ptr ZeroOrOneDuration;
385
386         /**
387          * <tt>xs:time?</tt>
388          */
389         static const SequenceType::Ptr ZeroOrOneTime;
390
391         /**
392          * <tt>xs:yearMonthDuration?</tt>
393          */
394         static const SequenceType::Ptr ZeroOrOneYearMonthDuration;
395
396     private:
397         /**
398          * The constructor is private and has no implementation,
399          * because this class is not meant to be instantiated.
400          *
401          * It should only be used via its static members.
402          */
403         inline CommonSequenceTypes();
404
405         Q_DISABLE_COPY(CommonSequenceTypes)
406     };
407 }
408
409 QT_END_NAMESPACE
410
411 QT_END_HEADER
412
413 #endif
414