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 test suite of the Qt Toolkit. |
7 | ** |
8 | ** $QT_BEGIN_LICENSE:GPL-EXCEPT$ |
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 General Public License Usage |
18 | ** Alternatively, this file may be used under the terms of the GNU |
19 | ** General Public License version 3 as published by the Free Software |
20 | ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT |
21 | ** included in the packaging of this file. Please review the following |
22 | ** information to ensure the GNU General Public License requirements will |
23 | ** be met: https://www.gnu.org/licenses/gpl-3.0.html. |
24 | ** |
25 | ** $QT_END_LICENSE$ |
26 | ** |
27 | ****************************************************************************/ |
28 | |
29 | #ifndef PatternistSDK_ExpressionNamer_H |
30 | #define PatternistSDK_ExpressionNamer_H |
31 | |
32 | #include "Global.h" |
33 | #include <private/qexpressiondispatch_p.h> |
34 | |
35 | QT_BEGIN_NAMESPACE |
36 | |
37 | namespace QPatternistSDK |
38 | { |
39 | /** |
40 | * @short Extracts debug information from a QPatternist::Expression tree. |
41 | * |
42 | * This data is the name of the AST node(typically the class name), |
43 | * and additional data such as the value, type of operator, and so forth. The result |
44 | * is returned(from visit()), is an ExpressionInfo instance. |
45 | * |
46 | * @see ExpressionInfo |
47 | * @see ASTItem |
48 | * @ingroup PatternistSDK |
49 | * @author Frans Englich <frans.englich@nokia.com> |
50 | */ |
51 | class ExpressionNamer : public QPatternist::ExpressionVisitor |
52 | { |
53 | public: |
54 | |
55 | virtual QPatternist::ExpressionVisitorResult::Ptr |
56 | visit(const QPatternist::AndExpression *) const; |
57 | |
58 | virtual QPatternist::ExpressionVisitorResult::Ptr |
59 | visit(const QPatternist::ApplyTemplate *) const; |
60 | |
61 | virtual QPatternist::ExpressionVisitorResult::Ptr |
62 | visit(const QPatternist::ArgumentReference *) const; |
63 | |
64 | virtual QPatternist::ExpressionVisitorResult::Ptr |
65 | visit(const QPatternist::ArithmeticExpression *) const; |
66 | |
67 | virtual QPatternist::ExpressionVisitorResult::Ptr |
68 | visit(const QPatternist::Atomizer *) const; |
69 | |
70 | virtual QPatternist::ExpressionVisitorResult::Ptr |
71 | visit(const QPatternist::AttributeConstructor *) const; |
72 | |
73 | virtual QPatternist::ExpressionVisitorResult::Ptr |
74 | visit(const QPatternist::AttributeNameValidator *) const; |
75 | |
76 | virtual QPatternist::ExpressionVisitorResult::Ptr |
77 | visit(const QPatternist::CallTemplate *) const; |
78 | |
79 | virtual QPatternist::ExpressionVisitorResult::Ptr |
80 | visit(const QPatternist::CardinalityVerifier *) const; |
81 | |
82 | virtual QPatternist::ExpressionVisitorResult::Ptr |
83 | visit(const QPatternist::CastAs *) const; |
84 | |
85 | virtual QPatternist::ExpressionVisitorResult::Ptr |
86 | visit(const QPatternist::CastableAs *) const; |
87 | |
88 | virtual QPatternist::ExpressionVisitorResult::Ptr |
89 | visit(const QPatternist::CollationChecker *) const; |
90 | |
91 | virtual QPatternist::ExpressionVisitorResult::Ptr |
92 | visit(const QPatternist::CombineNodes *) const; |
93 | |
94 | virtual QPatternist::ExpressionVisitorResult::Ptr |
95 | visit(const QPatternist::ComputedNamespaceConstructor *) const; |
96 | |
97 | virtual QPatternist::ExpressionVisitorResult::Ptr |
98 | visit(const QPatternist::CommentConstructor *) const; |
99 | |
100 | virtual QPatternist::ExpressionVisitorResult::Ptr |
101 | visit(const QPatternist::ContextItem *) const; |
102 | |
103 | virtual QPatternist::ExpressionVisitorResult::Ptr |
104 | visit(const QPatternist::CopyOf *) const; |
105 | |
106 | virtual QPatternist::ExpressionVisitorResult::Ptr |
107 | visit(const QPatternist::CurrentItemStore *) const; |
108 | |
109 | virtual QPatternist::ExpressionVisitorResult::Ptr |
110 | visit(const QPatternist::DocumentConstructor *) const; |
111 | |
112 | virtual QPatternist::ExpressionVisitorResult::Ptr |
113 | visit(const QPatternist::DynamicContextStore *) const; |
114 | |
115 | virtual QPatternist::ExpressionVisitorResult::Ptr |
116 | visit(const QPatternist::EBVExtractor *) const; |
117 | |
118 | virtual QPatternist::ExpressionVisitorResult::Ptr |
119 | visit(const QPatternist::ElementConstructor *) const; |
120 | |
121 | virtual QPatternist::ExpressionVisitorResult::Ptr |
122 | visit(const QPatternist::EmptySequence *) const; |
123 | |
124 | virtual QPatternist::ExpressionVisitorResult::Ptr |
125 | visit(const QPatternist::ExpressionSequence *) const; |
126 | |
127 | virtual QPatternist::ExpressionVisitorResult::Ptr |
128 | visit(const QPatternist::ExpressionVariableReference *) const; |
129 | |
130 | virtual QPatternist::ExpressionVisitorResult::Ptr |
131 | visit(const QPatternist::ExternalVariableReference *) const; |
132 | |
133 | virtual QPatternist::ExpressionVisitorResult::Ptr |
134 | visit(const QPatternist::EvaluationCache<true> *) const; |
135 | |
136 | virtual QPatternist::ExpressionVisitorResult::Ptr |
137 | visit(const QPatternist::EvaluationCache<false> *) const; |
138 | |
139 | virtual QPatternist::ExpressionVisitorResult::Ptr |
140 | visit(const QPatternist::FirstItemPredicate *) const; |
141 | |
142 | virtual QPatternist::ExpressionVisitorResult::Ptr |
143 | visit(const QPatternist::ForClause *) const; |
144 | |
145 | virtual QPatternist::ExpressionVisitorResult::Ptr |
146 | visit(const QPatternist::FunctionCall *) const; |
147 | |
148 | virtual QPatternist::ExpressionVisitorResult::Ptr |
149 | visit(const QPatternist::GeneralComparison *) const; |
150 | |
151 | virtual QPatternist::ExpressionVisitorResult::Ptr |
152 | visit(const QPatternist::GenericPredicate *) const; |
153 | |
154 | virtual QPatternist::ExpressionVisitorResult::Ptr |
155 | visit(const QPatternist::IfThenClause *) const; |
156 | |
157 | virtual QPatternist::ExpressionVisitorResult::Ptr |
158 | visit(const QPatternist::InstanceOf *) const; |
159 | |
160 | virtual QPatternist::ExpressionVisitorResult::Ptr |
161 | visit(const QPatternist::ItemVerifier *) const; |
162 | |
163 | virtual QPatternist::ExpressionVisitorResult::Ptr |
164 | visit(const QPatternist::LetClause *) const; |
165 | |
166 | virtual QPatternist::ExpressionVisitorResult::Ptr |
167 | visit(const QPatternist::Literal *) const; |
168 | |
169 | virtual QPatternist::ExpressionVisitorResult::Ptr |
170 | visit(const QPatternist::LiteralSequence *) const; |
171 | |
172 | virtual QPatternist::ExpressionVisitorResult::Ptr |
173 | visit(const QPatternist::NCNameConstructor *) const; |
174 | |
175 | virtual QPatternist::ExpressionVisitorResult::Ptr |
176 | visit(const QPatternist::NodeComparison *) const; |
177 | |
178 | virtual QPatternist::ExpressionVisitorResult::Ptr |
179 | visit(const QPatternist::NodeSortExpression *) const; |
180 | |
181 | virtual QPatternist::ExpressionVisitorResult::Ptr |
182 | visit(const QPatternist::OrderBy *) const; |
183 | |
184 | virtual QPatternist::ExpressionVisitorResult::Ptr |
185 | visit(const QPatternist::OrExpression *) const; |
186 | |
187 | virtual QPatternist::ExpressionVisitorResult::Ptr |
188 | visit(const QPatternist::ParentNodeAxis *) const; |
189 | |
190 | virtual QPatternist::ExpressionVisitorResult::Ptr |
191 | visit(const QPatternist::Path *) const; |
192 | |
193 | virtual QPatternist::ExpressionVisitorResult::Ptr |
194 | visit(const QPatternist::PositionalVariableReference *) const; |
195 | |
196 | virtual QPatternist::ExpressionVisitorResult::Ptr |
197 | visit(const QPatternist::ProcessingInstructionConstructor *) const; |
198 | |
199 | virtual QPatternist::ExpressionVisitorResult::Ptr |
200 | visit(const QPatternist::QNameConstructor *) const; |
201 | |
202 | virtual QPatternist::ExpressionVisitorResult::Ptr |
203 | visit(const QPatternist::QuantifiedExpression *) const; |
204 | |
205 | virtual QPatternist::ExpressionVisitorResult::Ptr |
206 | visit(const QPatternist::RangeExpression *) const; |
207 | |
208 | virtual QPatternist::ExpressionVisitorResult::Ptr |
209 | visit(const QPatternist::RangeVariableReference *) const; |
210 | |
211 | virtual QPatternist::ExpressionVisitorResult::Ptr |
212 | visit(const QPatternist::ReturnOrderBy *) const; |
213 | |
214 | virtual QPatternist::ExpressionVisitorResult::Ptr |
215 | visit(const QPatternist::SimpleContentConstructor *) const; |
216 | |
217 | virtual QPatternist::ExpressionVisitorResult::Ptr |
218 | visit(const QPatternist::StaticBaseURIStore *) const; |
219 | |
220 | virtual QPatternist::ExpressionVisitorResult::Ptr |
221 | visit(const QPatternist::StaticCompatibilityStore *) const; |
222 | |
223 | virtual QPatternist::ExpressionVisitorResult::Ptr |
224 | visit(const QPatternist::AxisStep *) const; |
225 | |
226 | virtual QPatternist::ExpressionVisitorResult::Ptr |
227 | visit(const QPatternist::TemplateParameterReference *) const; |
228 | |
229 | virtual QPatternist::ExpressionVisitorResult::Ptr |
230 | visit(const QPatternist::TextNodeConstructor *) const; |
231 | |
232 | virtual QPatternist::ExpressionVisitorResult::Ptr |
233 | visit(const QPatternist::TreatAs *) const; |
234 | |
235 | virtual QPatternist::ExpressionVisitorResult::Ptr |
236 | visit(const QPatternist::TruthPredicate *) const; |
237 | |
238 | virtual QPatternist::ExpressionVisitorResult::Ptr |
239 | visit(const QPatternist::UntypedAtomicConverter *) const; |
240 | |
241 | virtual QPatternist::ExpressionVisitorResult::Ptr |
242 | visit(const QPatternist::UnresolvedVariableReference *) const; |
243 | |
244 | virtual QPatternist::ExpressionVisitorResult::Ptr |
245 | visit(const QPatternist::ArgumentConverter *) const; |
246 | |
247 | virtual QPatternist::ExpressionVisitorResult::Ptr |
248 | visit(const QPatternist::UserFunctionCallsite *) const; |
249 | |
250 | virtual QPatternist::ExpressionVisitorResult::Ptr |
251 | visit(const QPatternist::ValidationError *) const; |
252 | |
253 | virtual QPatternist::ExpressionVisitorResult::Ptr |
254 | visit(const QPatternist::ValueComparison *) const; |
255 | |
256 | virtual QPatternist::ExpressionVisitorResult::Ptr |
257 | visit(const QPatternist::NamespaceConstructor *) const; |
258 | }; |
259 | } |
260 | |
261 | QT_END_NAMESPACE |
262 | |
263 | #endif |
264 | // vim: et:ts=4:sw=4:sts=4 |
265 |