| 1 | /**************************************************************************** |
| 2 | ** |
| 3 | ** Copyright (C) 2016 The Qt Company Ltd. |
| 4 | ** Contact: https://www.qt.io/licensing/ |
| 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 The Qt Company. For licensing terms |
| 14 | ** and conditions see https://www.qt.io/terms-conditions. For further |
| 15 | ** information use the contact form at https://www.qt.io/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 3 as published by the Free Software |
| 20 | ** Foundation and appearing in the file LICENSE.LGPL3 included in the |
| 21 | ** packaging of this file. Please review the following information to |
| 22 | ** ensure the GNU Lesser General Public License version 3 requirements |
| 23 | ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. |
| 24 | ** |
| 25 | ** GNU General Public License Usage |
| 26 | ** Alternatively, this file may be used under the terms of the GNU |
| 27 | ** General Public License version 2.0 or (at your option) the GNU General |
| 28 | ** Public license version 3 or any later version approved by the KDE Free |
| 29 | ** Qt Foundation. The licenses are as published by the Free Software |
| 30 | ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 |
| 31 | ** included in the packaging of this file. Please review the following |
| 32 | ** information to ensure the GNU General Public License requirements will |
| 33 | ** be met: https://www.gnu.org/licenses/gpl-2.0.html and |
| 34 | ** https://www.gnu.org/licenses/gpl-3.0.html. |
| 35 | ** |
| 36 | ** $QT_END_LICENSE$ |
| 37 | ** |
| 38 | ****************************************************************************/ |
| 39 | |
| 40 | // |
| 41 | // W A R N I N G |
| 42 | // ------------- |
| 43 | // |
| 44 | // This file is not part of the Qt API. It exists purely as an |
| 45 | // implementation detail. This header file may change from version to |
| 46 | // version without notice, or even be removed. |
| 47 | // |
| 48 | // We mean it. |
| 49 | |
| 50 | #ifndef Patternist_BuiltinTypes_H |
| 51 | #define Patternist_BuiltinTypes_H |
| 52 | |
| 53 | #include <private/qanynodetype_p.h> |
| 54 | #include <private/qanysimpletype_p.h> |
| 55 | #include <private/qanytype_p.h> |
| 56 | #include <private/qbuiltinatomictype_p.h> |
| 57 | #include <private/qitemtype_p.h> |
| 58 | #include <private/qnumerictype_p.h> |
| 59 | #include <private/quntyped_p.h> |
| 60 | |
| 61 | QT_BEGIN_NAMESPACE |
| 62 | |
| 63 | namespace QPatternist |
| 64 | { |
| 65 | |
| 66 | /** |
| 67 | * @short Provides access to singleton instances of ItemType and SchemaType sub-classes. |
| 68 | * |
| 69 | * @ingroup Patternist_types |
| 70 | * @author Frans Englich <frans.englich@nokia.com> |
| 71 | */ |
| 72 | class Q_AUTOTEST_EXPORT BuiltinTypes |
| 73 | { |
| 74 | public: |
| 75 | static const SchemaType::Ptr xsAnyType; |
| 76 | static const SchemaType::Ptr xsAnySimpleType; |
| 77 | static const SchemaType::Ptr xsUntyped; |
| 78 | |
| 79 | static const AtomicType::Ptr xsAnyAtomicType; |
| 80 | static const AtomicType::Ptr xsUntypedAtomic; |
| 81 | static const AtomicType::Ptr xsDateTime; |
| 82 | static const AtomicType::Ptr xsDate; |
| 83 | static const AtomicType::Ptr xsTime; |
| 84 | static const AtomicType::Ptr xsDuration; |
| 85 | static const AtomicType::Ptr xsYearMonthDuration; |
| 86 | static const AtomicType::Ptr xsDayTimeDuration; |
| 87 | |
| 88 | /** |
| 89 | * An artificial type for implementation purposes |
| 90 | * that represents the XPath type @c numeric. |
| 91 | */ |
| 92 | static const AtomicType::Ptr numeric; |
| 93 | static const AtomicType::Ptr xsFloat; |
| 94 | static const AtomicType::Ptr xsDouble; |
| 95 | static const AtomicType::Ptr xsInteger; |
| 96 | static const AtomicType::Ptr xsDecimal; |
| 97 | static const AtomicType::Ptr xsNonPositiveInteger; |
| 98 | static const AtomicType::Ptr xsNegativeInteger; |
| 99 | static const AtomicType::Ptr xsLong; |
| 100 | static const AtomicType::Ptr xsInt; |
| 101 | static const AtomicType::Ptr xsShort; |
| 102 | static const AtomicType::Ptr xsByte; |
| 103 | static const AtomicType::Ptr xsNonNegativeInteger; |
| 104 | static const AtomicType::Ptr xsUnsignedLong; |
| 105 | static const AtomicType::Ptr xsUnsignedInt; |
| 106 | static const AtomicType::Ptr xsUnsignedShort; |
| 107 | static const AtomicType::Ptr xsUnsignedByte; |
| 108 | static const AtomicType::Ptr xsPositiveInteger; |
| 109 | |
| 110 | |
| 111 | static const AtomicType::Ptr xsGYearMonth; |
| 112 | static const AtomicType::Ptr xsGYear; |
| 113 | static const AtomicType::Ptr xsGMonthDay; |
| 114 | static const AtomicType::Ptr xsGDay; |
| 115 | static const AtomicType::Ptr xsGMonth; |
| 116 | |
| 117 | static const AtomicType::Ptr xsBoolean; |
| 118 | |
| 119 | static const AtomicType::Ptr xsBase64Binary; |
| 120 | static const AtomicType::Ptr xsHexBinary; |
| 121 | static const AtomicType::Ptr xsAnyURI; |
| 122 | static const AtomicType::Ptr xsQName; |
| 123 | static const AtomicType::Ptr xsString; |
| 124 | static const AtomicType::Ptr xsNormalizedString; |
| 125 | static const AtomicType::Ptr xsToken; |
| 126 | static const AtomicType::Ptr xsLanguage; |
| 127 | static const AtomicType::Ptr xsNMTOKEN; |
| 128 | static const AtomicType::Ptr xsName; |
| 129 | static const AtomicType::Ptr xsNCName; |
| 130 | static const AtomicType::Ptr xsID; |
| 131 | static const AtomicType::Ptr xsIDREF; |
| 132 | static const AtomicType::Ptr xsENTITY; |
| 133 | |
| 134 | static const AtomicType::Ptr xsNOTATION; |
| 135 | static const ItemType::Ptr item; |
| 136 | |
| 137 | static const AnyNodeType::Ptr node; |
| 138 | |
| 139 | /** |
| 140 | * When the node test node() is used without axes in a pattern in |
| 141 | * XSL-T, it doesn't match document nodes. See 5.5.3 The Meaning of a |
| 142 | * Pattern. |
| 143 | * |
| 144 | * This node test does that. |
| 145 | */ |
| 146 | static const ItemType::Ptr xsltNodeTest; |
| 147 | |
| 148 | static const ItemType::Ptr attribute; |
| 149 | static const ItemType::Ptr ; |
| 150 | static const ItemType::Ptr document; |
| 151 | static const ItemType::Ptr element; |
| 152 | static const ItemType::Ptr pi; |
| 153 | static const ItemType::Ptr text; |
| 154 | |
| 155 | private: |
| 156 | /** |
| 157 | * The constructor is protected because this class is not meant to be instantiated, |
| 158 | * but should only be used via its static const members. |
| 159 | */ |
| 160 | BuiltinTypes(); |
| 161 | Q_DISABLE_COPY(BuiltinTypes) |
| 162 | }; |
| 163 | } |
| 164 | |
| 165 | QT_END_NAMESPACE |
| 166 | |
| 167 | #endif |
| 168 | |
| 169 | |