|
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 test suite 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 #ifndef PatternistSDK_ExpressionNamer_H |
|
43 #define PatternistSDK_ExpressionNamer_H |
|
44 |
|
45 #include "Global.h" |
|
46 #include "qexpressiondispatch_p.h" |
|
47 |
|
48 QT_BEGIN_HEADER |
|
49 |
|
50 QT_BEGIN_NAMESPACE |
|
51 |
|
52 namespace QPatternistSDK |
|
53 { |
|
54 /** |
|
55 * @short Extracts debug information from a QPatternist::Expression tree. |
|
56 * |
|
57 * This data is the name of the AST node(typically the class name), |
|
58 * and additional data such as the value, type of operator, and so forth. The result |
|
59 * is returned(from visit()), is an ExpressionInfo instance. |
|
60 * |
|
61 * @see ExpressionInfo |
|
62 * @see ASTItem |
|
63 * @ingroup PatternistSDK |
|
64 * @author Frans Englich <frans.englich@nokia.com> |
|
65 */ |
|
66 class Q_PATTERNISTSDK_EXPORT ExpressionNamer : public QPatternist::ExpressionVisitor |
|
67 { |
|
68 public: |
|
69 |
|
70 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
71 visit(const QPatternist::AndExpression *) const; |
|
72 |
|
73 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
74 visit(const QPatternist::ApplyTemplate *) const; |
|
75 |
|
76 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
77 visit(const QPatternist::ArgumentReference *) const; |
|
78 |
|
79 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
80 visit(const QPatternist::ArithmeticExpression *) const; |
|
81 |
|
82 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
83 visit(const QPatternist::Atomizer *) const; |
|
84 |
|
85 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
86 visit(const QPatternist::AttributeConstructor *) const; |
|
87 |
|
88 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
89 visit(const QPatternist::AttributeNameValidator *) const; |
|
90 |
|
91 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
92 visit(const QPatternist::CallTemplate *) const; |
|
93 |
|
94 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
95 visit(const QPatternist::CardinalityVerifier *) const; |
|
96 |
|
97 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
98 visit(const QPatternist::CastAs *) const; |
|
99 |
|
100 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
101 visit(const QPatternist::CastableAs *) const; |
|
102 |
|
103 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
104 visit(const QPatternist::CollationChecker *) const; |
|
105 |
|
106 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
107 visit(const QPatternist::CombineNodes *) const; |
|
108 |
|
109 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
110 visit(const QPatternist::ComputedNamespaceConstructor *) const; |
|
111 |
|
112 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
113 visit(const QPatternist::CommentConstructor *) const; |
|
114 |
|
115 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
116 visit(const QPatternist::ContextItem *) const; |
|
117 |
|
118 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
119 visit(const QPatternist::CopyOf *) const; |
|
120 |
|
121 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
122 visit(const QPatternist::CurrentItemStore *) const; |
|
123 |
|
124 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
125 visit(const QPatternist::DocumentConstructor *) const; |
|
126 |
|
127 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
128 visit(const QPatternist::DynamicContextStore *) const; |
|
129 |
|
130 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
131 visit(const QPatternist::EBVExtractor *) const; |
|
132 |
|
133 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
134 visit(const QPatternist::ElementConstructor *) const; |
|
135 |
|
136 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
137 visit(const QPatternist::EmptySequence *) const; |
|
138 |
|
139 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
140 visit(const QPatternist::ExpressionSequence *) const; |
|
141 |
|
142 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
143 visit(const QPatternist::ExpressionVariableReference *) const; |
|
144 |
|
145 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
146 visit(const QPatternist::ExternalVariableReference *) const; |
|
147 |
|
148 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
149 visit(const QPatternist::EvaluationCache<true> *) const; |
|
150 |
|
151 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
152 visit(const QPatternist::EvaluationCache<false> *) const; |
|
153 |
|
154 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
155 visit(const QPatternist::FirstItemPredicate *) const; |
|
156 |
|
157 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
158 visit(const QPatternist::ForClause *) const; |
|
159 |
|
160 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
161 visit(const QPatternist::FunctionCall *) const; |
|
162 |
|
163 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
164 visit(const QPatternist::GeneralComparison *) const; |
|
165 |
|
166 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
167 visit(const QPatternist::GenericPredicate *) const; |
|
168 |
|
169 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
170 visit(const QPatternist::IfThenClause *) const; |
|
171 |
|
172 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
173 visit(const QPatternist::InstanceOf *) const; |
|
174 |
|
175 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
176 visit(const QPatternist::ItemVerifier *) const; |
|
177 |
|
178 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
179 visit(const QPatternist::LetClause *) const; |
|
180 |
|
181 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
182 visit(const QPatternist::Literal *) const; |
|
183 |
|
184 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
185 visit(const QPatternist::LiteralSequence *) const; |
|
186 |
|
187 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
188 visit(const QPatternist::NCNameConstructor *) const; |
|
189 |
|
190 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
191 visit(const QPatternist::NodeComparison *) const; |
|
192 |
|
193 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
194 visit(const QPatternist::NodeSortExpression *) const; |
|
195 |
|
196 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
197 visit(const QPatternist::OrderBy *) const; |
|
198 |
|
199 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
200 visit(const QPatternist::OrExpression *) const; |
|
201 |
|
202 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
203 visit(const QPatternist::ParentNodeAxis *) const; |
|
204 |
|
205 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
206 visit(const QPatternist::Path *) const; |
|
207 |
|
208 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
209 visit(const QPatternist::PositionalVariableReference *) const; |
|
210 |
|
211 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
212 visit(const QPatternist::ProcessingInstructionConstructor *) const; |
|
213 |
|
214 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
215 visit(const QPatternist::QNameConstructor *) const; |
|
216 |
|
217 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
218 visit(const QPatternist::QuantifiedExpression *) const; |
|
219 |
|
220 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
221 visit(const QPatternist::RangeExpression *) const; |
|
222 |
|
223 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
224 visit(const QPatternist::RangeVariableReference *) const; |
|
225 |
|
226 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
227 visit(const QPatternist::ReturnOrderBy *) const; |
|
228 |
|
229 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
230 visit(const QPatternist::SimpleContentConstructor *) const; |
|
231 |
|
232 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
233 visit(const QPatternist::StaticBaseURIStore *) const; |
|
234 |
|
235 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
236 visit(const QPatternist::StaticCompatibilityStore *) const; |
|
237 |
|
238 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
239 visit(const QPatternist::AxisStep *) const; |
|
240 |
|
241 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
242 visit(const QPatternist::TemplateParameterReference *) const; |
|
243 |
|
244 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
245 visit(const QPatternist::TextNodeConstructor *) const; |
|
246 |
|
247 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
248 visit(const QPatternist::TreatAs *) const; |
|
249 |
|
250 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
251 visit(const QPatternist::TruthPredicate *) const; |
|
252 |
|
253 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
254 visit(const QPatternist::UntypedAtomicConverter *) const; |
|
255 |
|
256 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
257 visit(const QPatternist::UnresolvedVariableReference *) const; |
|
258 |
|
259 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
260 visit(const QPatternist::ArgumentConverter *) const; |
|
261 |
|
262 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
263 visit(const QPatternist::UserFunctionCallsite *) const; |
|
264 |
|
265 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
266 visit(const QPatternist::ValidationError *) const; |
|
267 |
|
268 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
269 visit(const QPatternist::ValueComparison *) const; |
|
270 |
|
271 virtual QPatternist::ExpressionVisitorResult::Ptr |
|
272 visit(const QPatternist::NamespaceConstructor *) const; |
|
273 }; |
|
274 } |
|
275 |
|
276 QT_END_NAMESPACE |
|
277 |
|
278 QT_END_HEADER |
|
279 |
|
280 #endif |
|
281 // vim: et:ts=4:sw=4:sts=4 |