Qt 4.8
qstaticcontext_p.h
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 //
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_StaticContext_H
53 #define Patternist_StaticContext_H
54 
56 #include "qitemtype_p.h"
57 #include "qnamepool_p.h"
58 #include "qnamespaceresolver_p.h"
59 #include "qreportcontext_p.h"
60 #include "qresourceloader_p.h"
61 
63 
65 
66 class QUrl;
67 template<typename Key, typename T> class QHash;
68 
69 namespace QPatternist
70 {
71  class DynamicContext;
72  class Expression;
73  class FunctionFactory;
74  class SchemaTypeFactory;
75 
89  {
90  public:
95 
103  {
106  };
107 
115  {
118  };
119 
127  {
130  };
131 
139  {
142  };
143 
145  {
148  };
149 
151  {
154  };
155 
156  inline StaticContext()
157  {
158  }
159 
160  virtual ~StaticContext();
161 
162  virtual NamespaceResolver::Ptr namespaceBindings() const = 0;
163  virtual void setNamespaceBindings(const NamespaceResolver::Ptr &) = 0;
166 
174  virtual QUrl baseURI() const = 0;
175 
176  virtual void setBaseURI(const QUrl &uri) = 0;
177 
183  virtual QString defaultFunctionNamespace() const = 0;
184  virtual void setDefaultFunctionNamespace(const QString &ns) = 0;
185 
186  virtual QString defaultElementNamespace() const = 0;
187  virtual void setDefaultElementNamespace(const QString &ns) = 0;
188 
195  virtual QUrl defaultCollation() const = 0;
196 
197  virtual void setDefaultCollation(const QUrl &uri) = 0;
198 
207  virtual bool compatModeEnabled() const = 0;
208 
209  virtual void setCompatModeEnabled(const bool newVal) = 0;
210 
216 
217  virtual BoundarySpacePolicy boundarySpacePolicy() const = 0;
218  virtual void setBoundarySpacePolicy(const BoundarySpacePolicy policy) = 0;
219 
220  virtual ConstructionMode constructionMode() const = 0;
221  virtual void setConstructionMode(const ConstructionMode mode) = 0;
222 
223  virtual OrderingMode orderingMode() const = 0;
224  virtual void setOrderingMode(const OrderingMode mode) = 0;
225  virtual OrderingEmptySequence orderingEmptySequence() const = 0;
226  virtual void setOrderingEmptySequence(const OrderingEmptySequence ordering) = 0;
227 
228  virtual InheritMode inheritMode() const = 0;
229  virtual void setInheritMode(const InheritMode mode) = 0;
230 
231  virtual PreserveMode preserveMode() const = 0;
232  virtual void setPreserveMode(const PreserveMode mode) = 0;
233 
244  virtual ItemType::Ptr contextItemType() const = 0;
245 
250  virtual ItemType::Ptr currentItemType() const = 0;
251 
259  virtual StaticContext::Ptr copy() const = 0;
260 
262  virtual ResourceLoader::Ptr resourceLoader() const = 0;
263  virtual NamePool::Ptr namePool() const = 0;
264 
268  virtual void addLocation(const SourceLocationReflection *const reflection,
269  const QSourceLocation &location) = 0;
270 
278  virtual LocationHash sourceLocations() const = 0;
279 
280  virtual VariableSlotID currentRangeSlot() const = 0;
281  virtual VariableSlotID allocateRangeSlot() = 0;
282 
290  void wrapExpressionWith(const SourceLocationReflection *const existingNode,
292  };
293 }
294 
296 
298 
299 #endif
qint32 VariableSlotID
virtual void setInheritMode(const InheritMode mode)=0
virtual bool compatModeEnabled() const =0
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
#define QT_BEGIN_HEADER
Definition: qglobal.h:136
virtual OrderingMode orderingMode() const =0
virtual BoundarySpacePolicy boundarySpacePolicy() const =0
virtual ConstructionMode constructionMode() const =0
virtual void setPreserveMode(const PreserveMode mode)=0
virtual NamePool::Ptr namePool() const =0
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
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
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 void setOrderingEmptySequence(const OrderingEmptySequence ordering)=0
virtual QExplicitlySharedDataPointer< FunctionFactory > functionSignatures() const =0
Carries information and facilities used at compilation time.
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
virtual void setCompatModeEnabled(const bool newVal)=0
virtual StaticContext::Ptr copy() const =0
virtual QExplicitlySharedDataPointer< DynamicContext > dynamicContext() const =0
virtual void setDefaultFunctionNamespace(const QString &ns)=0
static QTestResult::TestLocation location
Definition: qtestresult.cpp:63
virtual LocationHash sourceLocations() const =0
Returns a hash of the contained locations.
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 InheritMode inheritMode() const =0
virtual void setOrderingMode(const OrderingMode mode)=0
A callback for reporting errors.
virtual QUrl defaultCollation() const =0
QExplicitlySharedDataPointer< StaticContext > Ptr
virtual void setDefaultCollation(const QUrl &uri)=0
#define QT_END_HEADER
Definition: qglobal.h:137
void wrapExpressionWith(const SourceLocationReflection *const existingNode, const QExplicitlySharedDataPointer< Expression > &newNode)
Ensures source locations are handled in such a manner that existingNode wraps newNode.
virtual QUrl baseURI() const =0
virtual PreserveMode preserveMode() const =0
Base class for all instances that represents something at a certain location.