| 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_AtomicMathematicianLocators_H | 
| 51 | #define Patternist_AtomicMathematicianLocators_H | 
| 52 |  | 
| 53 | #include <private/qatomicmathematician_p.h> | 
| 54 | #include <private/qatomicmathematicianlocator_p.h> | 
| 55 |  | 
| 56 | /** | 
| 57 |  * @file | 
| 58 |  * @short Contains AtomicMathematicianLocator sub-classes that finds classes | 
| 59 |  * which can perform arithmetics between atomic values. | 
| 60 |  */ | 
| 61 |  | 
| 62 | QT_BEGIN_NAMESPACE | 
| 63 |  | 
| 64 | namespace QPatternist | 
| 65 | { | 
| 66 |     /** | 
| 67 |      * @author Frans Englich <frans.englich@nokia.com> | 
| 68 |      * @todo docs | 
| 69 |      */ | 
| 70 |     class DoubleMathematicianLocator : public AtomicMathematicianLocator | 
| 71 |     { | 
| 72 |         using AtomicMathematicianLocator::visit; | 
| 73 |         AtomicTypeVisitorResult::Ptr visit(const DayTimeDurationType *, const qint16 op, | 
| 74 |                                            const SourceLocationReflection *const r) const override; | 
| 75 |         AtomicTypeVisitorResult::Ptr visit(const DecimalType *, const qint16 op, | 
| 76 |                                            const SourceLocationReflection *const r) const override; | 
| 77 |         AtomicTypeVisitorResult::Ptr visit(const DoubleType *, const qint16 op, | 
| 78 |                                            const SourceLocationReflection *const r) const override; | 
| 79 |         AtomicTypeVisitorResult::Ptr visit(const FloatType *, const qint16 op, | 
| 80 |                                            const SourceLocationReflection *const r) const override; | 
| 81 |         AtomicTypeVisitorResult::Ptr visit(const IntegerType *, const qint16 op, | 
| 82 |                                            const SourceLocationReflection *const r) const override; | 
| 83 |         AtomicTypeVisitorResult::Ptr visit(const YearMonthDurationType *, const qint16 op, | 
| 84 |                                            const SourceLocationReflection *const r) const override; | 
| 85 |     }; | 
| 86 |  | 
| 87 |     /** | 
| 88 |      * @author Frans Englich <frans.englich@nokia.com> | 
| 89 |      * @todo docs | 
| 90 |      */ | 
| 91 |     class FloatMathematicianLocator : public AtomicMathematicianLocator | 
| 92 |     { | 
| 93 |         using AtomicMathematicianLocator::visit; | 
| 94 |         AtomicTypeVisitorResult::Ptr visit(const DayTimeDurationType *, const qint16 op, | 
| 95 |                                            const SourceLocationReflection *const r) const override; | 
| 96 |         AtomicTypeVisitorResult::Ptr visit(const DecimalType *, const qint16 op, | 
| 97 |                                            const SourceLocationReflection *const r) const override; | 
| 98 |         AtomicTypeVisitorResult::Ptr visit(const DoubleType *, const qint16 op, | 
| 99 |                                            const SourceLocationReflection *const r) const override; | 
| 100 |         AtomicTypeVisitorResult::Ptr visit(const FloatType *, const qint16 op, | 
| 101 |                                            const SourceLocationReflection *const r) const override; | 
| 102 |         AtomicTypeVisitorResult::Ptr visit(const IntegerType *, const qint16 op, | 
| 103 |                                            const SourceLocationReflection *const r) const override; | 
| 104 |         AtomicTypeVisitorResult::Ptr visit(const YearMonthDurationType *, const qint16 op, | 
| 105 |                                            const SourceLocationReflection *const r) const override; | 
| 106 |     }; | 
| 107 |  | 
| 108 |     /** | 
| 109 |      * @author Frans Englich <frans.englich@nokia.com> | 
| 110 |      * @todo docs | 
| 111 |      */ | 
| 112 |     class DecimalMathematicianLocator : public AtomicMathematicianLocator | 
| 113 |     { | 
| 114 |         using AtomicMathematicianLocator::visit; | 
| 115 |         AtomicTypeVisitorResult::Ptr visit(const DayTimeDurationType *, const qint16 op, | 
| 116 |                                            const SourceLocationReflection *const r) const override; | 
| 117 |         AtomicTypeVisitorResult::Ptr visit(const DecimalType *, const qint16 op, | 
| 118 |                                            const SourceLocationReflection *const r) const override; | 
| 119 |         AtomicTypeVisitorResult::Ptr visit(const DoubleType *, const qint16 op, | 
| 120 |                                            const SourceLocationReflection *const r) const override; | 
| 121 |         AtomicTypeVisitorResult::Ptr visit(const FloatType *, const qint16 op, | 
| 122 |                                            const SourceLocationReflection *const r) const override; | 
| 123 |         AtomicTypeVisitorResult::Ptr visit(const IntegerType *, const qint16 op, | 
| 124 |                                            const SourceLocationReflection *const r) const override; | 
| 125 |         AtomicTypeVisitorResult::Ptr visit(const YearMonthDurationType *, const qint16 op, | 
| 126 |                                            const SourceLocationReflection *const r) const override; | 
| 127 |     }; | 
| 128 |  | 
| 129 |     /** | 
| 130 |      * @author Frans Englich <frans.englich@nokia.com> | 
| 131 |      * @todo docs | 
| 132 |      */ | 
| 133 |     class IntegerMathematicianLocator : public AtomicMathematicianLocator | 
| 134 |     { | 
| 135 |         using AtomicMathematicianLocator::visit; | 
| 136 |         AtomicTypeVisitorResult::Ptr visit(const DayTimeDurationType *, const qint16 op, | 
| 137 |                                            const SourceLocationReflection *const r) const override; | 
| 138 |         AtomicTypeVisitorResult::Ptr visit(const DecimalType *, const qint16 op, | 
| 139 |                                            const SourceLocationReflection *const r) const override; | 
| 140 |         AtomicTypeVisitorResult::Ptr visit(const DoubleType *, const qint16 op, | 
| 141 |                                            const SourceLocationReflection *const r) const override; | 
| 142 |         AtomicTypeVisitorResult::Ptr visit(const FloatType *, const qint16 op, | 
| 143 |                                            const SourceLocationReflection *const r) const override; | 
| 144 |         AtomicTypeVisitorResult::Ptr visit(const IntegerType *, const qint16 op, | 
| 145 |                                            const SourceLocationReflection *const r) const override; | 
| 146 |         AtomicTypeVisitorResult::Ptr visit(const YearMonthDurationType *, const qint16 op, | 
| 147 |                                            const SourceLocationReflection *const r) const override; | 
| 148 |     }; | 
| 149 |  | 
| 150 |     /** | 
| 151 |      * @author Frans Englich <frans.englich@nokia.com> | 
| 152 |      * @todo docs | 
| 153 |      */ | 
| 154 |     class DateMathematicianLocator : public AtomicMathematicianLocator | 
| 155 |     { | 
| 156 |         using AtomicMathematicianLocator::visit; | 
| 157 |         AtomicTypeVisitorResult::Ptr visit(const DateType *, const qint16 op, | 
| 158 |                                            const SourceLocationReflection *const r) const override; | 
| 159 |         AtomicTypeVisitorResult::Ptr visit(const YearMonthDurationType *, const qint16 op, | 
| 160 |                                            const SourceLocationReflection *const r) const override; | 
| 161 |         AtomicTypeVisitorResult::Ptr visit(const DayTimeDurationType *, const qint16 op, | 
| 162 |                                            const SourceLocationReflection *const r) const override; | 
| 163 |     }; | 
| 164 |  | 
| 165 |     /** | 
| 166 |      * @author Frans Englich <frans.englich@nokia.com> | 
| 167 |      * @todo docs | 
| 168 |      */ | 
| 169 |     class SchemaTimeMathematicianLocator : public AtomicMathematicianLocator | 
| 170 |     { | 
| 171 |         using AtomicMathematicianLocator::visit; | 
| 172 |         AtomicTypeVisitorResult::Ptr visit(const SchemaTimeType *, const qint16 op, | 
| 173 |                                            const SourceLocationReflection *const r) const override; | 
| 174 |         AtomicTypeVisitorResult::Ptr visit(const DayTimeDurationType *, const qint16 op, | 
| 175 |                                            const SourceLocationReflection *const r) const override; | 
| 176 |     }; | 
| 177 |  | 
| 178 |     /** | 
| 179 |      * @author Frans Englich <frans.englich@nokia.com> | 
| 180 |      * @todo docs | 
| 181 |      */ | 
| 182 |     class DateTimeMathematicianLocator : public AtomicMathematicianLocator | 
| 183 |     { | 
| 184 |         using AtomicMathematicianLocator::visit; | 
| 185 |         AtomicTypeVisitorResult::Ptr visit(const DateTimeType *, const qint16 op, | 
| 186 |                                            const SourceLocationReflection *const r) const override; | 
| 187 |         AtomicTypeVisitorResult::Ptr visit(const YearMonthDurationType *, const qint16 op, | 
| 188 |                                            const SourceLocationReflection *const r) const override; | 
| 189 |         AtomicTypeVisitorResult::Ptr visit(const DayTimeDurationType *, const qint16 op, | 
| 190 |                                            const SourceLocationReflection *const r) const override; | 
| 191 |     }; | 
| 192 |     /** | 
| 193 |      * @author Frans Englich <frans.englich@nokia.com> | 
| 194 |      * @todo docs | 
| 195 |      */ | 
| 196 |     class DayTimeDurationMathematicianLocator : public AtomicMathematicianLocator | 
| 197 |     { | 
| 198 |         using AtomicMathematicianLocator::visit; | 
| 199 |         AtomicTypeVisitorResult::Ptr visit(const DateTimeType *, const qint16 op, | 
| 200 |                                            const SourceLocationReflection *const r) const override; | 
| 201 |         AtomicTypeVisitorResult::Ptr visit(const DateType *, const qint16 op, | 
| 202 |                                            const SourceLocationReflection *const r) const override; | 
| 203 |         AtomicTypeVisitorResult::Ptr visit(const DayTimeDurationType *, const qint16 op, | 
| 204 |                                            const SourceLocationReflection *const r) const override; | 
| 205 |         AtomicTypeVisitorResult::Ptr visit(const DecimalType *, const qint16 op, | 
| 206 |                                            const SourceLocationReflection *const r) const override; | 
| 207 |         AtomicTypeVisitorResult::Ptr visit(const DoubleType *, const qint16 op, | 
| 208 |                                            const SourceLocationReflection *const r) const override; | 
| 209 |         AtomicTypeVisitorResult::Ptr visit(const FloatType *, const qint16 op, | 
| 210 |                                            const SourceLocationReflection *const r) const override; | 
| 211 |         AtomicTypeVisitorResult::Ptr visit(const IntegerType *, const qint16 op, | 
| 212 |                                            const SourceLocationReflection *const r) const override; | 
| 213 |         AtomicTypeVisitorResult::Ptr visit(const SchemaTimeType *, const qint16 op, | 
| 214 |                                            const SourceLocationReflection *const r) const override; | 
| 215 |     }; | 
| 216 |  | 
| 217 |     /** | 
| 218 |      * @author Frans Englich <frans.englich@nokia.com> | 
| 219 |      * @todo docs | 
| 220 |      */ | 
| 221 |     class YearMonthDurationMathematicianLocator : public AtomicMathematicianLocator | 
| 222 |     { | 
| 223 |         using AtomicMathematicianLocator::visit; | 
| 224 |         AtomicTypeVisitorResult::Ptr visit(const DateTimeType *, const qint16 op, | 
| 225 |                                            const SourceLocationReflection *const r) const override; | 
| 226 |         AtomicTypeVisitorResult::Ptr visit(const DateType *, const qint16 op, | 
| 227 |                                            const SourceLocationReflection *const r) const override; | 
| 228 |         AtomicTypeVisitorResult::Ptr visit(const DecimalType *, const qint16 op, | 
| 229 |                                            const SourceLocationReflection *const r) const override; | 
| 230 |         AtomicTypeVisitorResult::Ptr visit(const DoubleType *, const qint16 op, | 
| 231 |                                            const SourceLocationReflection *const r) const override; | 
| 232 |         AtomicTypeVisitorResult::Ptr visit(const FloatType *, const qint16 op, | 
| 233 |                                            const SourceLocationReflection *const r) const override; | 
| 234 |         AtomicTypeVisitorResult::Ptr visit(const IntegerType *, const qint16 op, | 
| 235 |                                            const SourceLocationReflection *const r) const override; | 
| 236 |         AtomicTypeVisitorResult::Ptr visit(const YearMonthDurationType *, const qint16 op, | 
| 237 |                                            const SourceLocationReflection *const r) const override; | 
| 238 |     }; | 
| 239 | } | 
| 240 |  | 
| 241 | QT_END_NAMESPACE | 
| 242 |  | 
| 243 | #endif | 
| 244 |  |