1 /****************************************************************************
3 ** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
6 ** This file is part of the test suite of the Qt Toolkit.
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 Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
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 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
40 ****************************************************************************/
42 #ifndef PatternistSDK_ExpressionNamer_H
43 #define PatternistSDK_ExpressionNamer_H
46 #include <private/qexpressiondispatch_p.h>
52 namespace QPatternistSDK
55 * @short Extracts debug information from a QPatternist::Expression tree.
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.
63 * @ingroup PatternistSDK
64 * @author Frans Englich <frans.englich@nokia.com>
66 class Q_PATTERNISTSDK_EXPORT ExpressionNamer : public QPatternist::ExpressionVisitor
70 virtual QPatternist::ExpressionVisitorResult::Ptr
71 visit(const QPatternist::AndExpression *) const;
73 virtual QPatternist::ExpressionVisitorResult::Ptr
74 visit(const QPatternist::ApplyTemplate *) const;
76 virtual QPatternist::ExpressionVisitorResult::Ptr
77 visit(const QPatternist::ArgumentReference *) const;
79 virtual QPatternist::ExpressionVisitorResult::Ptr
80 visit(const QPatternist::ArithmeticExpression *) const;
82 virtual QPatternist::ExpressionVisitorResult::Ptr
83 visit(const QPatternist::Atomizer *) const;
85 virtual QPatternist::ExpressionVisitorResult::Ptr
86 visit(const QPatternist::AttributeConstructor *) const;
88 virtual QPatternist::ExpressionVisitorResult::Ptr
89 visit(const QPatternist::AttributeNameValidator *) const;
91 virtual QPatternist::ExpressionVisitorResult::Ptr
92 visit(const QPatternist::CallTemplate *) const;
94 virtual QPatternist::ExpressionVisitorResult::Ptr
95 visit(const QPatternist::CardinalityVerifier *) const;
97 virtual QPatternist::ExpressionVisitorResult::Ptr
98 visit(const QPatternist::CastAs *) const;
100 virtual QPatternist::ExpressionVisitorResult::Ptr
101 visit(const QPatternist::CastableAs *) const;
103 virtual QPatternist::ExpressionVisitorResult::Ptr
104 visit(const QPatternist::CollationChecker *) const;
106 virtual QPatternist::ExpressionVisitorResult::Ptr
107 visit(const QPatternist::CombineNodes *) const;
109 virtual QPatternist::ExpressionVisitorResult::Ptr
110 visit(const QPatternist::ComputedNamespaceConstructor *) const;
112 virtual QPatternist::ExpressionVisitorResult::Ptr
113 visit(const QPatternist::CommentConstructor *) const;
115 virtual QPatternist::ExpressionVisitorResult::Ptr
116 visit(const QPatternist::ContextItem *) const;
118 virtual QPatternist::ExpressionVisitorResult::Ptr
119 visit(const QPatternist::CopyOf *) const;
121 virtual QPatternist::ExpressionVisitorResult::Ptr
122 visit(const QPatternist::CurrentItemStore *) const;
124 virtual QPatternist::ExpressionVisitorResult::Ptr
125 visit(const QPatternist::DocumentConstructor *) const;
127 virtual QPatternist::ExpressionVisitorResult::Ptr
128 visit(const QPatternist::DynamicContextStore *) const;
130 virtual QPatternist::ExpressionVisitorResult::Ptr
131 visit(const QPatternist::EBVExtractor *) const;
133 virtual QPatternist::ExpressionVisitorResult::Ptr
134 visit(const QPatternist::ElementConstructor *) const;
136 virtual QPatternist::ExpressionVisitorResult::Ptr
137 visit(const QPatternist::EmptySequence *) const;
139 virtual QPatternist::ExpressionVisitorResult::Ptr
140 visit(const QPatternist::ExpressionSequence *) const;
142 virtual QPatternist::ExpressionVisitorResult::Ptr
143 visit(const QPatternist::ExpressionVariableReference *) const;
145 virtual QPatternist::ExpressionVisitorResult::Ptr
146 visit(const QPatternist::ExternalVariableReference *) const;
148 virtual QPatternist::ExpressionVisitorResult::Ptr
149 visit(const QPatternist::EvaluationCache<true> *) const;
151 virtual QPatternist::ExpressionVisitorResult::Ptr
152 visit(const QPatternist::EvaluationCache<false> *) const;
154 virtual QPatternist::ExpressionVisitorResult::Ptr
155 visit(const QPatternist::FirstItemPredicate *) const;
157 virtual QPatternist::ExpressionVisitorResult::Ptr
158 visit(const QPatternist::ForClause *) const;
160 virtual QPatternist::ExpressionVisitorResult::Ptr
161 visit(const QPatternist::FunctionCall *) const;
163 virtual QPatternist::ExpressionVisitorResult::Ptr
164 visit(const QPatternist::GeneralComparison *) const;
166 virtual QPatternist::ExpressionVisitorResult::Ptr
167 visit(const QPatternist::GenericPredicate *) const;
169 virtual QPatternist::ExpressionVisitorResult::Ptr
170 visit(const QPatternist::IfThenClause *) const;
172 virtual QPatternist::ExpressionVisitorResult::Ptr
173 visit(const QPatternist::InstanceOf *) const;
175 virtual QPatternist::ExpressionVisitorResult::Ptr
176 visit(const QPatternist::ItemVerifier *) const;
178 virtual QPatternist::ExpressionVisitorResult::Ptr
179 visit(const QPatternist::LetClause *) const;
181 virtual QPatternist::ExpressionVisitorResult::Ptr
182 visit(const QPatternist::Literal *) const;
184 virtual QPatternist::ExpressionVisitorResult::Ptr
185 visit(const QPatternist::LiteralSequence *) const;
187 virtual QPatternist::ExpressionVisitorResult::Ptr
188 visit(const QPatternist::NCNameConstructor *) const;
190 virtual QPatternist::ExpressionVisitorResult::Ptr
191 visit(const QPatternist::NodeComparison *) const;
193 virtual QPatternist::ExpressionVisitorResult::Ptr
194 visit(const QPatternist::NodeSortExpression *) const;
196 virtual QPatternist::ExpressionVisitorResult::Ptr
197 visit(const QPatternist::OrderBy *) const;
199 virtual QPatternist::ExpressionVisitorResult::Ptr
200 visit(const QPatternist::OrExpression *) const;
202 virtual QPatternist::ExpressionVisitorResult::Ptr
203 visit(const QPatternist::ParentNodeAxis *) const;
205 virtual QPatternist::ExpressionVisitorResult::Ptr
206 visit(const QPatternist::Path *) const;
208 virtual QPatternist::ExpressionVisitorResult::Ptr
209 visit(const QPatternist::PositionalVariableReference *) const;
211 virtual QPatternist::ExpressionVisitorResult::Ptr
212 visit(const QPatternist::ProcessingInstructionConstructor *) const;
214 virtual QPatternist::ExpressionVisitorResult::Ptr
215 visit(const QPatternist::QNameConstructor *) const;
217 virtual QPatternist::ExpressionVisitorResult::Ptr
218 visit(const QPatternist::QuantifiedExpression *) const;
220 virtual QPatternist::ExpressionVisitorResult::Ptr
221 visit(const QPatternist::RangeExpression *) const;
223 virtual QPatternist::ExpressionVisitorResult::Ptr
224 visit(const QPatternist::RangeVariableReference *) const;
226 virtual QPatternist::ExpressionVisitorResult::Ptr
227 visit(const QPatternist::ReturnOrderBy *) const;
229 virtual QPatternist::ExpressionVisitorResult::Ptr
230 visit(const QPatternist::SimpleContentConstructor *) const;
232 virtual QPatternist::ExpressionVisitorResult::Ptr
233 visit(const QPatternist::StaticBaseURIStore *) const;
235 virtual QPatternist::ExpressionVisitorResult::Ptr
236 visit(const QPatternist::StaticCompatibilityStore *) const;
238 virtual QPatternist::ExpressionVisitorResult::Ptr
239 visit(const QPatternist::AxisStep *) const;
241 virtual QPatternist::ExpressionVisitorResult::Ptr
242 visit(const QPatternist::TemplateParameterReference *) const;
244 virtual QPatternist::ExpressionVisitorResult::Ptr
245 visit(const QPatternist::TextNodeConstructor *) const;
247 virtual QPatternist::ExpressionVisitorResult::Ptr
248 visit(const QPatternist::TreatAs *) const;
250 virtual QPatternist::ExpressionVisitorResult::Ptr
251 visit(const QPatternist::TruthPredicate *) const;
253 virtual QPatternist::ExpressionVisitorResult::Ptr
254 visit(const QPatternist::UntypedAtomicConverter *) const;
256 virtual QPatternist::ExpressionVisitorResult::Ptr
257 visit(const QPatternist::UnresolvedVariableReference *) const;
259 virtual QPatternist::ExpressionVisitorResult::Ptr
260 visit(const QPatternist::ArgumentConverter *) const;
262 virtual QPatternist::ExpressionVisitorResult::Ptr
263 visit(const QPatternist::UserFunctionCallsite *) const;
265 virtual QPatternist::ExpressionVisitorResult::Ptr
266 visit(const QPatternist::ValidationError *) const;
268 virtual QPatternist::ExpressionVisitorResult::Ptr
269 visit(const QPatternist::ValueComparison *) const;
271 virtual QPatternist::ExpressionVisitorResult::Ptr
272 visit(const QPatternist::NamespaceConstructor *) const;
281 // vim: et:ts=4:sw=4:sts=4