Qt 4.8
qcommonsequencetypes.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 "qebvtype_p.h"
43 #include "qgenericsequencetype_p.h"
44 #include "qnonetype_p.h"
45 
46 #include "qcommonsequencetypes_p.h"
47 
48 /* To avoid the static initialization fiasco, we put the builtin types in this compilation unit, since
49  * the sequence types depends on them. */
50 #include "qbuiltintypes.cpp"
51 
53 
54 using namespace QPatternist;
55 
56 // STATIC DATA
57 #define st(var, type, card) \
58 const SequenceType::Ptr \
59 CommonSequenceTypes::var(new GenericSequenceType(BuiltinTypes::type, \
60  Cardinality::card()))
61 
62 /* Alphabetically. */
63 st(ExactlyOneAnyURI, xsAnyURI, exactlyOne);
64 st(ExactlyOneAtomicType, xsAnyAtomicType, exactlyOne);
65 st(ExactlyOneAttribute, attribute, exactlyOne);
66 st(ExactlyOneBase64Binary, xsBase64Binary, exactlyOne);
67 st(ExactlyOneBoolean, xsBoolean, exactlyOne);
68 st(ExactlyOneComment, comment, exactlyOne);
69 st(ExactlyOneDateTime, xsDateTime, exactlyOne);
70 st(ExactlyOneDate, xsDate, exactlyOne);
71 st(ExactlyOneDayTimeDuration, xsDayTimeDuration, exactlyOne);
72 st(ExactlyOneDecimal, xsDecimal, exactlyOne);
73 st(ExactlyOneDocumentNode, document, exactlyOne);
74 st(OneOrMoreDocumentNodes, document, oneOrMore);
75 st(ExactlyOneDouble, xsDouble, exactlyOne);
76 st(ExactlyOneDuration, xsDuration, exactlyOne);
77 st(ExactlyOneElement, element, exactlyOne);
78 st(ExactlyOneFloat, xsFloat, exactlyOne);
79 st(ExactlyOneGDay, xsGDay, exactlyOne);
80 st(ExactlyOneGMonthDay, xsGMonthDay, exactlyOne);
81 st(ExactlyOneGMonth, xsGMonth, exactlyOne);
82 st(ExactlyOneGYearMonth, xsGYearMonth, exactlyOne);
83 st(ExactlyOneGYear, xsGYear, exactlyOne);
84 st(ExactlyOneHexBinary, xsHexBinary, exactlyOne);
85 st(ExactlyOneInteger, xsInteger, exactlyOne);
86 st(ExactlyOneItem, item, exactlyOne);
87 st(ExactlyOneNCName, xsNCName, exactlyOne);
88 st(ExactlyOneNode, node, exactlyOne);
89 st(ExactlyOneNumeric, numeric, exactlyOne);
90 st(ExactlyOneProcessingInstruction, pi, exactlyOne);
91 st(ExactlyOneQName, xsQName, exactlyOne);
92 st(ExactlyOneString, xsString, exactlyOne);
93 st(ExactlyOneTextNode, text, exactlyOne);
94 st(ExactlyOneTime, xsTime, exactlyOne);
95 st(ExactlyOneUntypedAtomic, xsUntypedAtomic, exactlyOne);
96 st(ExactlyOneYearMonthDuration, xsYearMonthDuration, exactlyOne);
97 st(OneOrMoreItems, item, oneOrMore);
98 st(ZeroOrMoreAtomicTypes, xsAnyAtomicType, zeroOrMore);
99 st(ZeroOrMoreElements, element, zeroOrMore);
100 st(ZeroOrMoreIntegers, xsInteger, zeroOrMore);
101 st(ZeroOrMoreItems, item, zeroOrMore);
102 st(ZeroOrMoreNodes, node, zeroOrMore);
103 st(ZeroOrMoreStrings, xsString, zeroOrMore);
104 st(ZeroOrOneAnyURI, xsAnyURI, zeroOrOne);
105 st(ZeroOrOneAtomicType, xsAnyAtomicType, zeroOrOne);
106 st(ZeroOrOneBoolean, xsBoolean, zeroOrOne);
107 st(ZeroOrOneDateTime, xsDateTime, zeroOrOne);
108 st(ZeroOrOneDate, xsDate, zeroOrOne);
109 st(ZeroOrOneDayTimeDuration, xsDayTimeDuration, zeroOrOne);
110 st(ZeroOrOneDecimal, xsDecimal, zeroOrOne);
111 st(ZeroOrOneDocumentNode, document, zeroOrOne);
112 st(ZeroOrOneDuration, xsDuration, zeroOrOne);
113 st(ZeroOrOneInteger, xsInteger, zeroOrOne);
114 st(ZeroOrOneItem, item, zeroOrOne);
115 st(ZeroOrOneNCName, xsNCName, zeroOrOne);
116 st(ZeroOrOneNode, node, zeroOrOne);
117 st(ZeroOrOneNumeric, numeric, zeroOrOne);
118 st(ZeroOrOneQName, xsQName, zeroOrOne);
119 st(ZeroOrOneString, xsString, zeroOrOne);
120 st(ZeroOrOneTextNode, text, zeroOrOne);
121 st(ZeroOrOneTime, xsTime, zeroOrOne);
122 st(ZeroOrOneYearMonthDuration, xsYearMonthDuration, zeroOrOne);
123 
124 #undef st
125 
126 /* Special cases. */
130 
131 
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
xsAnyAtomicType numeric xsDuration xsAnyAtomicType xsAnyAtomicType xsAnyAtomicType xsAnyAtomicType xsAnyAtomicType xsGYearMonth
xsAnyAtomicType numeric xsDuration xsAnyAtomicType xsTime
qint64 xsInteger
xsAnyAtomicType numeric xsDuration xsAnyAtomicType xsAnyAtomicType xsAnyAtomicType xsGDay
The QExplicitlySharedDataPointer class represents a pointer to an explicitly shared object...
Definition: qshareddata.h:136
xsDouble xsDecimal
Represents the type for which a value of can an Effective Boolean Value be extracted from...
Definition: qebvtype_p.h:76
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
xsAnyAtomicType numeric xsDuration xsDate
xsAnyAtomicType numeric xsDuration xsAnyAtomicType xsAnyAtomicType xsAnyAtomicType xsAnyAtomicType xsGMonthDay
The namespace for the internal API of QtXmlPatterns.
static const EmptySequenceType::Ptr Empty
xsAnyAtomicType numeric xsDuration xsAnyAtomicType xsAnyAtomicType xsBoolean
xsAnyAtomicType numeric xsDuration xsAnyAtomicType xsAnyAtomicType xsAnyAtomicType xsAnyAtomicType xsAnyAtomicType xsAnyAtomicType xsQName
#define st(var, type, card)
static const SequenceType::Ptr EBV
xsDouble xsFloat
xsAnyAtomicType numeric xsDayTimeDuration
#define text
Definition: qobjectdefs.h:80
Represents the empty-sequence() type.
Represents the special none type.
Definition: qnonetype_p.h:75