Qt 4.8
qdelegatingstaticcontext.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
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 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.
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 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.
24 **
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.
28 **
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.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 /* Patternist */
43 #include "qbasictypesfactory_p.h"
46 #include "qcommonnamespaces_p.h"
48 
49 #include "qstaticfocuscontext_p.h"
50 
52 
53 using namespace QPatternist;
54 
56 {
57  Q_ASSERT(context);
58 }
59 
61 {
62  return m_context->namespaceBindings();
63 }
64 
66 {
67  return m_context->functionSignatures();
68 }
69 
71 {
72  return m_context->dynamicContext();
73 }
74 
76 {
77  return m_context->schemaDefinitions();
78 }
79 
81 {
82  return m_context->baseURI();
83 }
84 
86 {
87  m_context->setBaseURI(uri);
88 }
89 
91 {
92  return m_context->compatModeEnabled();
93 }
94 
96 {
97  return m_context->defaultCollation();
98 }
99 
101 {
102  return m_context->messageHandler();
103 }
104 
106 {
108 }
109 
111 {
112  m_context->setNamespaceBindings(resolver);
113 }
114 
116 {
117  return m_context->boundarySpacePolicy();
118 }
119 
121 {
123 }
124 
126 {
127  return m_context->constructionMode();
128 }
129 
131 {
133 }
134 
136 {
137  return m_context->orderingMode();
138 }
139 
141 {
142  m_context->setOrderingMode(mode);
143 }
144 
146 {
148 }
149 
151 {
153 }
154 
156 {
158 }
159 
161 {
163 }
164 
166 {
168 }
169 
171 {
173 }
174 
176 {
177  return m_context->inheritMode();
178 }
179 
181 {
182  m_context->setInheritMode(mode);
183 }
184 
186 {
187  return m_context->preserveMode();
188 }
189 
191 {
192  m_context->setPreserveMode(mode);
193 }
194 
196 {
197  return m_context->contextItemType();
198 }
199 
201 {
202  return m_context->currentItemType();
203 }
204 
206 {
208 }
209 
211 {
213 }
214 
216 {
217  return m_context->resourceLoader();
218 }
219 
221 {
222  return m_context->namePool();
223 }
224 
226  const QSourceLocation &location)
227 {
228  m_context->addLocation(reflection, location);
229 }
230 
232 {
233  return m_context->sourceLocations();
234 }
235 
237 {
238  return m_context->locationFor(reflection);
239 }
240 
242 {
243  return m_context->uriResolver();
244 }
245 
247 {
248  return m_context->currentRangeSlot();
249 }
250 
252 {
253  return m_context->allocateRangeSlot();
254 }
255 
257 {
259 }
260 
virtual ResourceLoader::Ptr resourceLoader() const
qint32 VariableSlotID
virtual void setInheritMode(const InheritMode mode)=0
virtual bool compatModeEnabled() const =0
virtual void setBoundarySpacePolicy(const BoundarySpacePolicy policy)
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
virtual void setOrderingEmptySequence(const OrderingEmptySequence ordering)
virtual void setDefaultFunctionNamespace(const QString &ns)
virtual void setCompatModeEnabled(const bool newVal)
virtual BoundarySpacePolicy boundarySpacePolicy() const
virtual OrderingMode orderingMode() const =0
virtual void setDefaultElementNamespace(const QString &ns)
virtual BoundarySpacePolicy boundarySpacePolicy() const =0
virtual void setConstructionMode(const ConstructionMode mode)
virtual ConstructionMode constructionMode() const =0
virtual void setPreserveMode(const PreserveMode mode)=0
virtual NamePool::Ptr namePool() const =0
virtual ItemType::Ptr currentItemType() const
The static type of the current item, as returned by fn:current().
virtual QSourceLocation locationFor(const SourceLocationReflection *const reflection) const
Returns the source location applying for reflection.
virtual void addLocation(const SourceLocationReflection *const reflection, const QSourceLocation &location)
Adds location for reflection.
virtual void setOrderingMode(const OrderingMode mode)
virtual void setDefaultCollation(const QUrl &uri)
virtual ExternalVariableLoader::Ptr externalVariableLoader() const =0
The QUrl class provides a convenient interface for working with URLs.
Definition: qurl.h:61
The QString class provides a Unicode character string.
Definition: qstring.h:83
The QHash class is a template class that provides a hash-table-based dictionary.
Definition: qdatastream.h:66
virtual void setDefaultElementNamespace(const QString &ns)=0
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
virtual QAbstractMessageHandler * messageHandler() const
The QAbstractUriResolver class is a callback interface for resolving Uniform Resource Identifiers...
virtual void setBoundarySpacePolicy(const BoundarySpacePolicy policy)=0
virtual VariableSlotID allocateRangeSlot()=0
virtual void setBaseURI(const QUrl &uri)=0
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
DelegatingStaticContext(const StaticContext::Ptr &context)
virtual LocationHash sourceLocations() const
Returns a hash of the contained locations.
virtual OrderingEmptySequence orderingEmptySequence() const =0
The namespace for the internal API of QtXmlPatterns.
The QSourceLocation class identifies a location in a resource by URI, line, and column.
virtual NamespaceResolver::Ptr namespaceBindings() const =0
virtual QExplicitlySharedDataPointer< SchemaTypeFactory > schemaDefinitions() const =0
virtual ResourceLoader::Ptr resourceLoader() const =0
virtual VariableSlotID currentRangeSlot() const
virtual void setOrderingEmptySequence(const OrderingEmptySequence ordering)=0
virtual QExplicitlySharedDataPointer< FunctionFactory > functionSignatures() const =0
virtual QSourceLocation locationFor(const SourceLocationReflection *const reflection) const =0
Returns the source location applying for reflection.
virtual QAbstractMessageHandler * messageHandler() const =0
virtual ItemType::Ptr currentItemType() const =0
The static type of the current item, as returned by fn:current().
virtual VariableSlotID currentRangeSlot() const =0
virtual void setConstructionMode(const ConstructionMode mode)=0
virtual void addLocation(const SourceLocationReflection *const reflection, const QSourceLocation &location)=0
Adds location for reflection.
virtual QString defaultElementNamespace() const =0
The QAbstractMessageHandler class provides a callback interface for handling messages.
virtual void setCompatModeEnabled(const bool newVal)=0
virtual StaticContext::Ptr copy() const =0
virtual FunctionFactory::Ptr functionSignatures() const
virtual StaticContext::Ptr copy() const
virtual QExplicitlySharedDataPointer< DynamicContext > dynamicContext() const =0
virtual void setDefaultFunctionNamespace(const QString &ns)=0
virtual const QAbstractUriResolver * uriResolver() const
The URI resolver in use.
static QTestResult::TestLocation location
Definition: qtestresult.cpp:63
virtual LocationHash sourceLocations() const =0
Returns a hash of the contained locations.
virtual void setPreserveMode(const PreserveMode mode)
virtual ItemType::Ptr contextItemType() const
The static type of the context item.
virtual OrderingEmptySequence orderingEmptySequence() const
virtual ItemType::Ptr contextItemType() const =0
The static type of the context item.
virtual QString defaultFunctionNamespace() const =0
virtual void setNamespaceBindings(const NamespaceResolver::Ptr &)=0
virtual DynamicContext::Ptr dynamicContext() const
virtual InheritMode inheritMode() const =0
virtual NamespaceResolver::Ptr namespaceBindings() const
virtual void setOrderingMode(const OrderingMode mode)=0
virtual const QAbstractUriResolver * uriResolver() const =0
The URI resolver in use.
virtual void setInheritMode(const InheritMode mode)
virtual QUrl defaultCollation() const =0
QExplicitlySharedDataPointer< StaticContext > Ptr
virtual void setNamespaceBindings(const NamespaceResolver::Ptr &)
virtual void setDefaultCollation(const QUrl &uri)=0
virtual ConstructionMode constructionMode() const
virtual ExternalVariableLoader::Ptr externalVariableLoader() const
virtual SchemaTypeFactory::Ptr schemaDefinitions() const
virtual QUrl baseURI() const =0
virtual PreserveMode preserveMode() const =0
Base class for all instances that represents something at a certain location.