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_ExpressionDispatch_H |
51 | #define Patternist_ExpressionDispatch_H |
52 | |
53 | #include <QSharedData> |
54 | |
55 | |
56 | QT_BEGIN_NAMESPACE |
57 | |
58 | namespace QPatternist |
59 | { |
60 | class AndExpression; |
61 | class ApplyTemplate; |
62 | class ArgumentConverter; |
63 | class ArgumentReference; |
64 | class ArithmeticExpression; |
65 | class Atomizer; |
66 | class AttributeConstructor; |
67 | class AttributeNameValidator; |
68 | class AxisStep; |
69 | class CallTemplate; |
70 | class CardinalityVerifier; |
71 | class CardinalityVerifier; |
72 | class CastableAs; |
73 | class CastableAs; |
74 | class CastAs; |
75 | class CastAs; |
76 | class CollationChecker; |
77 | class CollationChecker; |
78 | class CombineNodes; |
79 | class CombineNodes; |
80 | class CommentConstructor; |
81 | class CommentConstructor; |
82 | class ComputedNamespaceConstructor; |
83 | class ContextItem; |
84 | class CopyOf; |
85 | class CurrentItemStore; |
86 | class DocumentConstructor; |
87 | class DynamicContextStore; |
88 | class EBVExtractor; |
89 | class ElementConstructor; |
90 | class EmptySequence; |
91 | class ExpressionSequence; |
92 | class ExpressionVariableReference; |
93 | class ExternalVariableReference; |
94 | class FirstItemPredicate; |
95 | class ForClause; |
96 | class FunctionCall; |
97 | class GeneralComparison; |
98 | class GenericPredicate; |
99 | class IfThenClause; |
100 | class InstanceOf; |
101 | class ItemVerifier; |
102 | class LetClause; |
103 | class Literal; |
104 | class LiteralSequence; |
105 | class NamespaceConstructor; |
106 | class NCNameConstructor; |
107 | class NodeComparison; |
108 | class NodeSortExpression; |
109 | class OrderBy; |
110 | class OrExpression; |
111 | class ParentNodeAxis; |
112 | class Path; |
113 | class PositionalVariableReference; |
114 | class ProcessingInstructionConstructor; |
115 | class QNameConstructor; |
116 | class QuantifiedExpression; |
117 | class RangeExpression; |
118 | class RangeVariableReference; |
119 | class ReturnOrderBy; |
120 | class SimpleContentConstructor; |
121 | class StaticBaseURIStore; |
122 | class StaticCompatibilityStore; |
123 | class TemplateParameterReference; |
124 | class TextNodeConstructor; |
125 | class TreatAs; |
126 | class TruthPredicate; |
127 | class UnresolvedVariableReference; |
128 | class UntypedAtomicConverter; |
129 | class UserFunctionCallsite; |
130 | class ValidationError; |
131 | class ValueComparison; |
132 | template<bool IsForGlobal> class EvaluationCache; |
133 | |
134 | /** |
135 | * @todo Documentation's missing |
136 | * |
137 | * @defgroup Patternist_expr_dispatch Expression Dispatching |
138 | */ |
139 | |
140 | /** |
141 | * @ingroup Patternist_expr_dispatch |
142 | * @author Frans Englich <frans.englich@nokia.com> |
143 | */ |
144 | class ExpressionVisitorResult : public QSharedData |
145 | { |
146 | public: |
147 | typedef QExplicitlySharedDataPointer<ExpressionVisitorResult> Ptr; |
148 | ExpressionVisitorResult() {} |
149 | virtual ~ExpressionVisitorResult() {} |
150 | }; |
151 | |
152 | /** |
153 | * @ingroup Patternist_expr_dispatch |
154 | * @author Frans Englich <frans.englich@nokia.com> |
155 | */ |
156 | class ExpressionVisitor : public QSharedData |
157 | { |
158 | public: |
159 | typedef QExplicitlySharedDataPointer<ExpressionVisitor> Ptr; |
160 | virtual ~ExpressionVisitor() {} |
161 | |
162 | virtual ExpressionVisitorResult::Ptr visit(const AndExpression *) const = 0; |
163 | virtual ExpressionVisitorResult::Ptr visit(const ApplyTemplate *) const = 0; |
164 | virtual ExpressionVisitorResult::Ptr visit(const ArgumentConverter *) const = 0; |
165 | virtual ExpressionVisitorResult::Ptr visit(const ArgumentReference *) const = 0; |
166 | virtual ExpressionVisitorResult::Ptr visit(const ArithmeticExpression *) const = 0; |
167 | virtual ExpressionVisitorResult::Ptr visit(const Atomizer *) const = 0; |
168 | virtual ExpressionVisitorResult::Ptr visit(const AttributeConstructor *) const = 0; |
169 | virtual ExpressionVisitorResult::Ptr visit(const AttributeNameValidator *) const = 0; |
170 | virtual ExpressionVisitorResult::Ptr visit(const AxisStep *) const = 0; |
171 | virtual ExpressionVisitorResult::Ptr visit(const CallTemplate *) const = 0; |
172 | virtual ExpressionVisitorResult::Ptr visit(const CardinalityVerifier *) const = 0; |
173 | virtual ExpressionVisitorResult::Ptr visit(const CastableAs *) const = 0; |
174 | virtual ExpressionVisitorResult::Ptr visit(const CastAs *) const = 0; |
175 | virtual ExpressionVisitorResult::Ptr visit(const CollationChecker *) const = 0; |
176 | virtual ExpressionVisitorResult::Ptr visit(const CombineNodes *) const = 0; |
177 | virtual ExpressionVisitorResult::Ptr visit(const CommentConstructor *) const = 0; |
178 | virtual ExpressionVisitorResult::Ptr visit(const ComputedNamespaceConstructor *) const = 0; |
179 | virtual ExpressionVisitorResult::Ptr visit(const ContextItem *) const = 0; |
180 | virtual ExpressionVisitorResult::Ptr visit(const CopyOf *) const = 0; |
181 | virtual ExpressionVisitorResult::Ptr visit(const CurrentItemStore *) const = 0; |
182 | virtual ExpressionVisitorResult::Ptr visit(const DocumentConstructor *) const = 0; |
183 | virtual ExpressionVisitorResult::Ptr visit(const DynamicContextStore *) const = 0; |
184 | virtual ExpressionVisitorResult::Ptr visit(const EBVExtractor *) const = 0; |
185 | virtual ExpressionVisitorResult::Ptr visit(const ElementConstructor *) const = 0; |
186 | virtual ExpressionVisitorResult::Ptr visit(const EmptySequence *) const = 0; |
187 | virtual ExpressionVisitorResult::Ptr visit(const EvaluationCache<false> *) const = 0; |
188 | virtual ExpressionVisitorResult::Ptr visit(const EvaluationCache<true> *) const = 0; |
189 | virtual ExpressionVisitorResult::Ptr visit(const ExpressionSequence *) const = 0; |
190 | virtual ExpressionVisitorResult::Ptr visit(const ExpressionVariableReference *) const = 0; |
191 | virtual ExpressionVisitorResult::Ptr visit(const ExternalVariableReference *) const = 0; |
192 | virtual ExpressionVisitorResult::Ptr visit(const FirstItemPredicate *) const = 0; |
193 | virtual ExpressionVisitorResult::Ptr visit(const ForClause *) const = 0; |
194 | virtual ExpressionVisitorResult::Ptr visit(const FunctionCall *) const = 0; |
195 | virtual ExpressionVisitorResult::Ptr visit(const GeneralComparison *) const = 0; |
196 | virtual ExpressionVisitorResult::Ptr visit(const GenericPredicate *) const = 0; |
197 | virtual ExpressionVisitorResult::Ptr visit(const IfThenClause *) const = 0; |
198 | virtual ExpressionVisitorResult::Ptr visit(const InstanceOf *) const = 0; |
199 | virtual ExpressionVisitorResult::Ptr visit(const ItemVerifier *) const = 0; |
200 | virtual ExpressionVisitorResult::Ptr visit(const LetClause *) const = 0; |
201 | virtual ExpressionVisitorResult::Ptr visit(const Literal *) const = 0; |
202 | virtual ExpressionVisitorResult::Ptr visit(const LiteralSequence *) const = 0; |
203 | virtual ExpressionVisitorResult::Ptr visit(const NamespaceConstructor *) const = 0; |
204 | virtual ExpressionVisitorResult::Ptr visit(const NCNameConstructor *) const = 0; |
205 | virtual ExpressionVisitorResult::Ptr visit(const NodeComparison *) const = 0; |
206 | virtual ExpressionVisitorResult::Ptr visit(const NodeSortExpression *) const = 0; |
207 | virtual ExpressionVisitorResult::Ptr visit(const OrderBy *) const = 0; |
208 | virtual ExpressionVisitorResult::Ptr visit(const OrExpression *) const = 0; |
209 | virtual ExpressionVisitorResult::Ptr visit(const ParentNodeAxis *) const = 0; |
210 | virtual ExpressionVisitorResult::Ptr visit(const Path *) const = 0; |
211 | virtual ExpressionVisitorResult::Ptr visit(const PositionalVariableReference *) const = 0; |
212 | virtual ExpressionVisitorResult::Ptr visit(const ProcessingInstructionConstructor *) const = 0; |
213 | virtual ExpressionVisitorResult::Ptr visit(const QNameConstructor *) const = 0; |
214 | virtual ExpressionVisitorResult::Ptr visit(const QuantifiedExpression *) const = 0; |
215 | virtual ExpressionVisitorResult::Ptr visit(const RangeExpression *) const = 0; |
216 | virtual ExpressionVisitorResult::Ptr visit(const RangeVariableReference *) const = 0; |
217 | virtual ExpressionVisitorResult::Ptr visit(const ReturnOrderBy *) const = 0; |
218 | virtual ExpressionVisitorResult::Ptr visit(const SimpleContentConstructor *) const = 0; |
219 | virtual ExpressionVisitorResult::Ptr visit(const StaticBaseURIStore *) const = 0; |
220 | virtual ExpressionVisitorResult::Ptr visit(const StaticCompatibilityStore *) const = 0; |
221 | virtual ExpressionVisitorResult::Ptr visit(const TemplateParameterReference *) const = 0; |
222 | virtual ExpressionVisitorResult::Ptr visit(const TextNodeConstructor *) const = 0; |
223 | virtual ExpressionVisitorResult::Ptr visit(const TreatAs *) const = 0; |
224 | virtual ExpressionVisitorResult::Ptr visit(const TruthPredicate *) const = 0; |
225 | virtual ExpressionVisitorResult::Ptr visit(const UnresolvedVariableReference *) const = 0; |
226 | virtual ExpressionVisitorResult::Ptr visit(const UntypedAtomicConverter *) const = 0; |
227 | virtual ExpressionVisitorResult::Ptr visit(const UserFunctionCallsite *) const = 0; |
228 | virtual ExpressionVisitorResult::Ptr visit(const ValidationError *) const = 0; |
229 | virtual ExpressionVisitorResult::Ptr visit(const ValueComparison *) const = 0; |
230 | }; |
231 | } |
232 | |
233 | QT_END_NAMESPACE |
234 | |
235 | #endif |
236 |