0
|
1 |
/****************************************************************************
|
|
2 |
**
|
|
3 |
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
4 |
** All rights reserved.
|
|
5 |
** Contact: Nokia Corporation (qt-info@nokia.com)
|
|
6 |
**
|
|
7 |
** This file is part of the QtXmlPatterns module of the Qt Toolkit.
|
|
8 |
**
|
|
9 |
** $QT_BEGIN_LICENSE:LGPL$
|
|
10 |
** No Commercial Usage
|
|
11 |
** This file contains pre-release code and may not be distributed.
|
|
12 |
** You may use this file in accordance with the terms and conditions
|
|
13 |
** contained in the Technology Preview License Agreement accompanying
|
|
14 |
** this package.
|
|
15 |
**
|
|
16 |
** GNU Lesser General Public License Usage
|
|
17 |
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
18 |
** General Public License version 2.1 as published by the Free Software
|
|
19 |
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
20 |
** packaging of this file. Please review the following information to
|
|
21 |
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
22 |
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
23 |
**
|
|
24 |
** In addition, as a special exception, Nokia gives you certain additional
|
|
25 |
** rights. These rights are described in the Nokia Qt LGPL Exception
|
|
26 |
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
27 |
**
|
|
28 |
** If you have questions regarding the use of this file, please contact
|
|
29 |
** Nokia at qt-info@nokia.com.
|
|
30 |
**
|
|
31 |
**
|
|
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_ExpressionDispatch_H
|
|
53 |
#define Patternist_ExpressionDispatch_H
|
|
54 |
|
|
55 |
#include <QSharedData>
|
|
56 |
|
|
57 |
|
|
58 |
QT_BEGIN_HEADER
|
|
59 |
|
|
60 |
QT_BEGIN_NAMESPACE
|
|
61 |
|
|
62 |
namespace QPatternist
|
|
63 |
{
|
|
64 |
class AndExpression;
|
|
65 |
class ApplyTemplate;
|
|
66 |
class ArgumentConverter;
|
|
67 |
class ArgumentReference;
|
|
68 |
class ArithmeticExpression;
|
|
69 |
class Atomizer;
|
|
70 |
class AttributeConstructor;
|
|
71 |
class AttributeNameValidator;
|
|
72 |
class AxisStep;
|
|
73 |
class CallTemplate;
|
|
74 |
class CardinalityVerifier;
|
|
75 |
class CardinalityVerifier;
|
|
76 |
class CastableAs;
|
|
77 |
class CastableAs;
|
|
78 |
class CastAs;
|
|
79 |
class CastAs;
|
|
80 |
class CollationChecker;
|
|
81 |
class CollationChecker;
|
|
82 |
class CombineNodes;
|
|
83 |
class CombineNodes;
|
|
84 |
class CommentConstructor;
|
|
85 |
class CommentConstructor;
|
|
86 |
class ComputedNamespaceConstructor;
|
|
87 |
class ContextItem;
|
|
88 |
class CopyOf;
|
|
89 |
class CurrentItemStore;
|
|
90 |
class DocumentConstructor;
|
|
91 |
class DynamicContextStore;
|
|
92 |
class EBVExtractor;
|
|
93 |
class ElementConstructor;
|
|
94 |
class EmptySequence;
|
|
95 |
class ExpressionSequence;
|
|
96 |
class ExpressionVariableReference;
|
|
97 |
class ExternalVariableReference;
|
|
98 |
class FirstItemPredicate;
|
|
99 |
class ForClause;
|
|
100 |
class FunctionCall;
|
|
101 |
class GeneralComparison;
|
|
102 |
class GenericPredicate;
|
|
103 |
class IfThenClause;
|
|
104 |
class InstanceOf;
|
|
105 |
class ItemVerifier;
|
|
106 |
class LetClause;
|
|
107 |
class Literal;
|
|
108 |
class LiteralSequence;
|
|
109 |
class NamespaceConstructor;
|
|
110 |
class NCNameConstructor;
|
|
111 |
class NodeComparison;
|
|
112 |
class NodeSortExpression;
|
|
113 |
class OrderBy;
|
|
114 |
class OrExpression;
|
|
115 |
class ParentNodeAxis;
|
|
116 |
class Path;
|
|
117 |
class PositionalVariableReference;
|
|
118 |
class ProcessingInstructionConstructor;
|
|
119 |
class QNameConstructor;
|
|
120 |
class QuantifiedExpression;
|
|
121 |
class RangeExpression;
|
|
122 |
class RangeVariableReference;
|
|
123 |
class ReturnOrderBy;
|
|
124 |
class SimpleContentConstructor;
|
|
125 |
class StaticBaseURIStore;
|
|
126 |
class StaticCompatibilityStore;
|
|
127 |
class TemplateParameterReference;
|
|
128 |
class TextNodeConstructor;
|
|
129 |
class TreatAs;
|
|
130 |
class TruthPredicate;
|
|
131 |
class UnresolvedVariableReference;
|
|
132 |
class UntypedAtomicConverter;
|
|
133 |
class UserFunctionCallsite;
|
|
134 |
class ValidationError;
|
|
135 |
class ValueComparison;
|
|
136 |
template<bool IsForGlobal> class EvaluationCache;
|
|
137 |
|
|
138 |
/**
|
|
139 |
* @todo Documentation's missing
|
|
140 |
*
|
|
141 |
* @defgroup Patternist_expr_dispatch Expression Dispatching
|
|
142 |
*/
|
|
143 |
|
|
144 |
/**
|
|
145 |
* @ingroup Patternist_expr_dispatch
|
|
146 |
* @author Frans Englich <frans.englich@nokia.com>
|
|
147 |
*/
|
|
148 |
class ExpressionVisitorResult : public QSharedData
|
|
149 |
{
|
|
150 |
public:
|
|
151 |
typedef QExplicitlySharedDataPointer<ExpressionVisitorResult> Ptr;
|
|
152 |
ExpressionVisitorResult() {}
|
|
153 |
virtual ~ExpressionVisitorResult() {}
|
|
154 |
};
|
|
155 |
|
|
156 |
/**
|
|
157 |
* @ingroup Patternist_expr_dispatch
|
|
158 |
* @author Frans Englich <frans.englich@nokia.com>
|
|
159 |
*/
|
|
160 |
class ExpressionVisitor : public QSharedData
|
|
161 |
{
|
|
162 |
public:
|
|
163 |
typedef QExplicitlySharedDataPointer<ExpressionVisitor> Ptr;
|
|
164 |
virtual ~ExpressionVisitor() {}
|
|
165 |
|
|
166 |
virtual ExpressionVisitorResult::Ptr visit(const AndExpression *) const = 0;
|
|
167 |
virtual ExpressionVisitorResult::Ptr visit(const ApplyTemplate *) const = 0;
|
|
168 |
virtual ExpressionVisitorResult::Ptr visit(const ArgumentConverter *) const = 0;
|
|
169 |
virtual ExpressionVisitorResult::Ptr visit(const ArgumentReference *) const = 0;
|
|
170 |
virtual ExpressionVisitorResult::Ptr visit(const ArithmeticExpression *) const = 0;
|
|
171 |
virtual ExpressionVisitorResult::Ptr visit(const Atomizer *) const = 0;
|
|
172 |
virtual ExpressionVisitorResult::Ptr visit(const AttributeConstructor *) const = 0;
|
|
173 |
virtual ExpressionVisitorResult::Ptr visit(const AttributeNameValidator *) const = 0;
|
|
174 |
virtual ExpressionVisitorResult::Ptr visit(const AxisStep *) const = 0;
|
|
175 |
virtual ExpressionVisitorResult::Ptr visit(const CallTemplate *) const = 0;
|
|
176 |
virtual ExpressionVisitorResult::Ptr visit(const CardinalityVerifier *) const = 0;
|
|
177 |
virtual ExpressionVisitorResult::Ptr visit(const CastableAs *) const = 0;
|
|
178 |
virtual ExpressionVisitorResult::Ptr visit(const CastAs *) const = 0;
|
|
179 |
virtual ExpressionVisitorResult::Ptr visit(const CollationChecker *) const = 0;
|
|
180 |
virtual ExpressionVisitorResult::Ptr visit(const CombineNodes *) const = 0;
|
|
181 |
virtual ExpressionVisitorResult::Ptr visit(const CommentConstructor *) const = 0;
|
|
182 |
virtual ExpressionVisitorResult::Ptr visit(const ComputedNamespaceConstructor *) const = 0;
|
|
183 |
virtual ExpressionVisitorResult::Ptr visit(const ContextItem *) const = 0;
|
|
184 |
virtual ExpressionVisitorResult::Ptr visit(const CopyOf *) const = 0;
|
|
185 |
virtual ExpressionVisitorResult::Ptr visit(const CurrentItemStore *) const = 0;
|
|
186 |
virtual ExpressionVisitorResult::Ptr visit(const DocumentConstructor *) const = 0;
|
|
187 |
virtual ExpressionVisitorResult::Ptr visit(const DynamicContextStore *) const = 0;
|
|
188 |
virtual ExpressionVisitorResult::Ptr visit(const EBVExtractor *) const = 0;
|
|
189 |
virtual ExpressionVisitorResult::Ptr visit(const ElementConstructor *) const = 0;
|
|
190 |
virtual ExpressionVisitorResult::Ptr visit(const EmptySequence *) const = 0;
|
|
191 |
virtual ExpressionVisitorResult::Ptr visit(const EvaluationCache<false> *) const = 0;
|
|
192 |
virtual ExpressionVisitorResult::Ptr visit(const EvaluationCache<true> *) const = 0;
|
|
193 |
virtual ExpressionVisitorResult::Ptr visit(const ExpressionSequence *) const = 0;
|
|
194 |
virtual ExpressionVisitorResult::Ptr visit(const ExpressionVariableReference *) const = 0;
|
|
195 |
virtual ExpressionVisitorResult::Ptr visit(const ExternalVariableReference *) const = 0;
|
|
196 |
virtual ExpressionVisitorResult::Ptr visit(const FirstItemPredicate *) const = 0;
|
|
197 |
virtual ExpressionVisitorResult::Ptr visit(const ForClause *) const = 0;
|
|
198 |
virtual ExpressionVisitorResult::Ptr visit(const FunctionCall *) const = 0;
|
|
199 |
virtual ExpressionVisitorResult::Ptr visit(const GeneralComparison *) const = 0;
|
|
200 |
virtual ExpressionVisitorResult::Ptr visit(const GenericPredicate *) const = 0;
|
|
201 |
virtual ExpressionVisitorResult::Ptr visit(const IfThenClause *) const = 0;
|
|
202 |
virtual ExpressionVisitorResult::Ptr visit(const InstanceOf *) const = 0;
|
|
203 |
virtual ExpressionVisitorResult::Ptr visit(const ItemVerifier *) const = 0;
|
|
204 |
virtual ExpressionVisitorResult::Ptr visit(const LetClause *) const = 0;
|
|
205 |
virtual ExpressionVisitorResult::Ptr visit(const Literal *) const = 0;
|
|
206 |
virtual ExpressionVisitorResult::Ptr visit(const LiteralSequence *) const = 0;
|
|
207 |
virtual ExpressionVisitorResult::Ptr visit(const NamespaceConstructor *) const = 0;
|
|
208 |
virtual ExpressionVisitorResult::Ptr visit(const NCNameConstructor *) const = 0;
|
|
209 |
virtual ExpressionVisitorResult::Ptr visit(const NodeComparison *) const = 0;
|
|
210 |
virtual ExpressionVisitorResult::Ptr visit(const NodeSortExpression *) const = 0;
|
|
211 |
virtual ExpressionVisitorResult::Ptr visit(const OrderBy *) const = 0;
|
|
212 |
virtual ExpressionVisitorResult::Ptr visit(const OrExpression *) const = 0;
|
|
213 |
virtual ExpressionVisitorResult::Ptr visit(const ParentNodeAxis *) const = 0;
|
|
214 |
virtual ExpressionVisitorResult::Ptr visit(const Path *) const = 0;
|
|
215 |
virtual ExpressionVisitorResult::Ptr visit(const PositionalVariableReference *) const = 0;
|
|
216 |
virtual ExpressionVisitorResult::Ptr visit(const ProcessingInstructionConstructor *) const = 0;
|
|
217 |
virtual ExpressionVisitorResult::Ptr visit(const QNameConstructor *) const = 0;
|
|
218 |
virtual ExpressionVisitorResult::Ptr visit(const QuantifiedExpression *) const = 0;
|
|
219 |
virtual ExpressionVisitorResult::Ptr visit(const RangeExpression *) const = 0;
|
|
220 |
virtual ExpressionVisitorResult::Ptr visit(const RangeVariableReference *) const = 0;
|
|
221 |
virtual ExpressionVisitorResult::Ptr visit(const ReturnOrderBy *) const = 0;
|
|
222 |
virtual ExpressionVisitorResult::Ptr visit(const SimpleContentConstructor *) const = 0;
|
|
223 |
virtual ExpressionVisitorResult::Ptr visit(const StaticBaseURIStore *) const = 0;
|
|
224 |
virtual ExpressionVisitorResult::Ptr visit(const StaticCompatibilityStore *) const = 0;
|
|
225 |
virtual ExpressionVisitorResult::Ptr visit(const TemplateParameterReference *) const = 0;
|
|
226 |
virtual ExpressionVisitorResult::Ptr visit(const TextNodeConstructor *) const = 0;
|
|
227 |
virtual ExpressionVisitorResult::Ptr visit(const TreatAs *) const = 0;
|
|
228 |
virtual ExpressionVisitorResult::Ptr visit(const TruthPredicate *) const = 0;
|
|
229 |
virtual ExpressionVisitorResult::Ptr visit(const UnresolvedVariableReference *) const = 0;
|
|
230 |
virtual ExpressionVisitorResult::Ptr visit(const UntypedAtomicConverter *) const = 0;
|
|
231 |
virtual ExpressionVisitorResult::Ptr visit(const UserFunctionCallsite *) const = 0;
|
|
232 |
virtual ExpressionVisitorResult::Ptr visit(const ValidationError *) const = 0;
|
|
233 |
virtual ExpressionVisitorResult::Ptr visit(const ValueComparison *) const = 0;
|
|
234 |
};
|
|
235 |
}
|
|
236 |
|
|
237 |
QT_END_NAMESPACE
|
|
238 |
|
|
239 |
QT_END_HEADER
|
|
240 |
|
|
241 |
#endif
|