1 /****************************************************************************
3 ** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
6 ** This file is part of the QtXmlPatterns module of the Qt Toolkit.
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.
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.
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.
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.
40 ****************************************************************************/
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.
52 #ifndef Patternist_AtomicMathematicianLocators_H
53 #define Patternist_AtomicMathematicianLocators_H
55 #include <private/qatomicmathematician_p.h>
56 #include <private/qatomicmathematicianlocator_p.h>
60 * @short Contains AtomicMathematicianLocator sub-classes that finds classes
61 * which can perform arithmetics between atomic values.
71 * @author Frans Englich <frans.englich@nokia.com>
74 class DoubleMathematicianLocator : public AtomicMathematicianLocator
76 using AtomicMathematicianLocator::visit;
77 virtual AtomicTypeVisitorResult::Ptr visit(const DayTimeDurationType *, const qint16 op,
78 const SourceLocationReflection *const r) const;
79 virtual AtomicTypeVisitorResult::Ptr visit(const DecimalType *, const qint16 op,
80 const SourceLocationReflection *const r) const;
81 virtual AtomicTypeVisitorResult::Ptr visit(const DoubleType *, const qint16 op,
82 const SourceLocationReflection *const r) const;
83 virtual AtomicTypeVisitorResult::Ptr visit(const FloatType *, const qint16 op,
84 const SourceLocationReflection *const r) const;
85 virtual AtomicTypeVisitorResult::Ptr visit(const IntegerType *, const qint16 op,
86 const SourceLocationReflection *const r) const;
87 virtual AtomicTypeVisitorResult::Ptr visit(const YearMonthDurationType *, const qint16 op,
88 const SourceLocationReflection *const r) const;
92 * @author Frans Englich <frans.englich@nokia.com>
95 class FloatMathematicianLocator : public AtomicMathematicianLocator
97 using AtomicMathematicianLocator::visit;
98 virtual AtomicTypeVisitorResult::Ptr visit(const DayTimeDurationType *, const qint16 op,
99 const SourceLocationReflection *const r) const;
100 virtual AtomicTypeVisitorResult::Ptr visit(const DecimalType *, const qint16 op,
101 const SourceLocationReflection *const r) const;
102 virtual AtomicTypeVisitorResult::Ptr visit(const DoubleType *, const qint16 op,
103 const SourceLocationReflection *const r) const;
104 virtual AtomicTypeVisitorResult::Ptr visit(const FloatType *, const qint16 op,
105 const SourceLocationReflection *const r) const;
106 virtual AtomicTypeVisitorResult::Ptr visit(const IntegerType *, const qint16 op,
107 const SourceLocationReflection *const r) const;
108 virtual AtomicTypeVisitorResult::Ptr visit(const YearMonthDurationType *, const qint16 op,
109 const SourceLocationReflection *const r) const;
113 * @author Frans Englich <frans.englich@nokia.com>
116 class DecimalMathematicianLocator : public AtomicMathematicianLocator
118 using AtomicMathematicianLocator::visit;
119 virtual AtomicTypeVisitorResult::Ptr visit(const DayTimeDurationType *, const qint16 op,
120 const SourceLocationReflection *const r) const;
121 virtual AtomicTypeVisitorResult::Ptr visit(const DecimalType *, const qint16 op,
122 const SourceLocationReflection *const r) const;
123 virtual AtomicTypeVisitorResult::Ptr visit(const DoubleType *, const qint16 op,
124 const SourceLocationReflection *const r) const;
125 virtual AtomicTypeVisitorResult::Ptr visit(const FloatType *, const qint16 op,
126 const SourceLocationReflection *const r) const;
127 virtual AtomicTypeVisitorResult::Ptr visit(const IntegerType *, const qint16 op,
128 const SourceLocationReflection *const r) const;
129 virtual AtomicTypeVisitorResult::Ptr visit(const YearMonthDurationType *, const qint16 op,
130 const SourceLocationReflection *const r) const;
134 * @author Frans Englich <frans.englich@nokia.com>
137 class IntegerMathematicianLocator : public AtomicMathematicianLocator
139 using AtomicMathematicianLocator::visit;
140 virtual AtomicTypeVisitorResult::Ptr visit(const DayTimeDurationType *, const qint16 op,
141 const SourceLocationReflection *const r) const;
142 virtual AtomicTypeVisitorResult::Ptr visit(const DecimalType *, const qint16 op,
143 const SourceLocationReflection *const r) const;
144 virtual AtomicTypeVisitorResult::Ptr visit(const DoubleType *, const qint16 op,
145 const SourceLocationReflection *const r) const;
146 virtual AtomicTypeVisitorResult::Ptr visit(const FloatType *, const qint16 op,
147 const SourceLocationReflection *const r) const;
148 virtual AtomicTypeVisitorResult::Ptr visit(const IntegerType *, const qint16 op,
149 const SourceLocationReflection *const r) const;
150 virtual AtomicTypeVisitorResult::Ptr visit(const YearMonthDurationType *, const qint16 op,
151 const SourceLocationReflection *const r) const;
155 * @author Frans Englich <frans.englich@nokia.com>
158 class DateMathematicianLocator : public AtomicMathematicianLocator
160 using AtomicMathematicianLocator::visit;
161 virtual AtomicTypeVisitorResult::Ptr visit(const DateType *, const qint16 op,
162 const SourceLocationReflection *const r) const;
163 virtual AtomicTypeVisitorResult::Ptr visit(const YearMonthDurationType *, const qint16 op,
164 const SourceLocationReflection *const r) const;
165 virtual AtomicTypeVisitorResult::Ptr visit(const DayTimeDurationType *, const qint16 op,
166 const SourceLocationReflection *const r) const;
170 * @author Frans Englich <frans.englich@nokia.com>
173 class SchemaTimeMathematicianLocator : public AtomicMathematicianLocator
175 using AtomicMathematicianLocator::visit;
176 virtual AtomicTypeVisitorResult::Ptr visit(const SchemaTimeType *, const qint16 op,
177 const SourceLocationReflection *const r) const;
178 virtual AtomicTypeVisitorResult::Ptr visit(const DayTimeDurationType *, const qint16 op,
179 const SourceLocationReflection *const r) const;
183 * @author Frans Englich <frans.englich@nokia.com>
186 class DateTimeMathematicianLocator : public AtomicMathematicianLocator
188 using AtomicMathematicianLocator::visit;
189 virtual AtomicTypeVisitorResult::Ptr visit(const DateTimeType *, const qint16 op,
190 const SourceLocationReflection *const r) const;
191 virtual AtomicTypeVisitorResult::Ptr visit(const YearMonthDurationType *, const qint16 op,
192 const SourceLocationReflection *const r) const;
193 virtual AtomicTypeVisitorResult::Ptr visit(const DayTimeDurationType *, const qint16 op,
194 const SourceLocationReflection *const r) const;
197 * @author Frans Englich <frans.englich@nokia.com>
200 class DayTimeDurationMathematicianLocator : public AtomicMathematicianLocator
202 using AtomicMathematicianLocator::visit;
203 virtual AtomicTypeVisitorResult::Ptr visit(const DateTimeType *, const qint16 op,
204 const SourceLocationReflection *const r) const;
205 virtual AtomicTypeVisitorResult::Ptr visit(const DateType *, const qint16 op,
206 const SourceLocationReflection *const r) const;
207 virtual AtomicTypeVisitorResult::Ptr visit(const DayTimeDurationType *, const qint16 op,
208 const SourceLocationReflection *const r) const;
209 virtual AtomicTypeVisitorResult::Ptr visit(const DecimalType *, const qint16 op,
210 const SourceLocationReflection *const r) const;
211 virtual AtomicTypeVisitorResult::Ptr visit(const DoubleType *, const qint16 op,
212 const SourceLocationReflection *const r) const;
213 virtual AtomicTypeVisitorResult::Ptr visit(const FloatType *, const qint16 op,
214 const SourceLocationReflection *const r) const;
215 virtual AtomicTypeVisitorResult::Ptr visit(const IntegerType *, const qint16 op,
216 const SourceLocationReflection *const r) const;
217 virtual AtomicTypeVisitorResult::Ptr visit(const SchemaTimeType *, const qint16 op,
218 const SourceLocationReflection *const r) const;
222 * @author Frans Englich <frans.englich@nokia.com>
225 class YearMonthDurationMathematicianLocator : public AtomicMathematicianLocator
227 using AtomicMathematicianLocator::visit;
228 virtual AtomicTypeVisitorResult::Ptr visit(const DateTimeType *, const qint16 op,
229 const SourceLocationReflection *const r) const;
230 virtual AtomicTypeVisitorResult::Ptr visit(const DateType *, const qint16 op,
231 const SourceLocationReflection *const r) const;
232 virtual AtomicTypeVisitorResult::Ptr visit(const DecimalType *, const qint16 op,
233 const SourceLocationReflection *const r) const;
234 virtual AtomicTypeVisitorResult::Ptr visit(const DoubleType *, const qint16 op,
235 const SourceLocationReflection *const r) const;
236 virtual AtomicTypeVisitorResult::Ptr visit(const FloatType *, const qint16 op,
237 const SourceLocationReflection *const r) const;
238 virtual AtomicTypeVisitorResult::Ptr visit(const IntegerType *, const qint16 op,
239 const SourceLocationReflection *const r) const;
240 virtual AtomicTypeVisitorResult::Ptr visit(const YearMonthDurationType *, const qint16 op,
241 const SourceLocationReflection *const r) const;