78f19db6be2c4e904a58c8187f0f19a83e6a3db5
[profile/ivi/qtxmlpatterns.git] / src / xmlpatterns / type / qatomicmathematicianlocators_p.h
1 /****************************************************************************
2 **
3 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/
5 **
6 ** This file is part of the QtXmlPatterns module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** GNU Lesser General Public License Usage
10 ** This file may be used under the terms of the GNU Lesser General Public
11 ** License version 2.1 as published by the Free Software Foundation and
12 ** appearing in the file LICENSE.LGPL included in the packaging of this
13 ** file. Please review the following information to ensure the GNU Lesser
14 ** General Public License version 2.1 requirements will be met:
15 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
16 **
17 ** In addition, as a special exception, Nokia gives you certain additional
18 ** rights. These rights are described in the Nokia Qt LGPL Exception
19 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
20 **
21 ** GNU General Public License Usage
22 ** Alternatively, this file may be used under the terms of the GNU General
23 ** Public License version 3.0 as published by the Free Software Foundation
24 ** and appearing in the file LICENSE.GPL included in the packaging of this
25 ** file. Please review the following information to ensure the GNU General
26 ** Public License version 3.0 requirements will be met:
27 ** http://www.gnu.org/copyleft/gpl.html.
28 **
29 ** Other Usage
30 ** Alternatively, this file may be used in accordance with the terms and
31 ** conditions contained in a signed written agreement between you and Nokia.
32 **
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_AtomicMathematicianLocators_H
53 #define Patternist_AtomicMathematicianLocators_H
54
55 #include <private/qatomicmathematician_p.h>
56 #include <private/qatomicmathematicianlocator_p.h>
57
58 /**
59  * @file
60  * @short Contains AtomicMathematicianLocator sub-classes that finds classes
61  * which can perform arithmetics between atomic values.
62  */
63
64 QT_BEGIN_HEADER
65
66 QT_BEGIN_NAMESPACE
67
68 namespace QPatternist
69 {
70     /**
71      * @author Frans Englich <frans.englich@nokia.com>
72      * @todo docs
73      */
74     class DoubleMathematicianLocator : public AtomicMathematicianLocator
75     {
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;
89     };
90
91     /**
92      * @author Frans Englich <frans.englich@nokia.com>
93      * @todo docs
94      */
95     class FloatMathematicianLocator : public AtomicMathematicianLocator
96     {
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;
110     };
111
112     /**
113      * @author Frans Englich <frans.englich@nokia.com>
114      * @todo docs
115      */
116     class DecimalMathematicianLocator : public AtomicMathematicianLocator
117     {
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;
131     };
132
133     /**
134      * @author Frans Englich <frans.englich@nokia.com>
135      * @todo docs
136      */
137     class IntegerMathematicianLocator : public AtomicMathematicianLocator
138     {
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;
152     };
153
154     /**
155      * @author Frans Englich <frans.englich@nokia.com>
156      * @todo docs
157      */
158     class DateMathematicianLocator : public AtomicMathematicianLocator
159     {
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;
167     };
168
169     /**
170      * @author Frans Englich <frans.englich@nokia.com>
171      * @todo docs
172      */
173     class SchemaTimeMathematicianLocator : public AtomicMathematicianLocator
174     {
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;
180     };
181
182     /**
183      * @author Frans Englich <frans.englich@nokia.com>
184      * @todo docs
185      */
186     class DateTimeMathematicianLocator : public AtomicMathematicianLocator
187     {
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;
195     };
196     /**
197      * @author Frans Englich <frans.englich@nokia.com>
198      * @todo docs
199      */
200     class DayTimeDurationMathematicianLocator : public AtomicMathematicianLocator
201     {
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;
219     };
220
221     /**
222      * @author Frans Englich <frans.englich@nokia.com>
223      * @todo docs
224      */
225     class YearMonthDurationMathematicianLocator : public AtomicMathematicianLocator
226     {
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;
242     };
243 }
244
245 QT_END_NAMESPACE
246
247 QT_END_HEADER
248
249 #endif