Qt 4.8
qdynamiccontext_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_DynamicContext_H
53 #define Patternist_DynamicContext_H
54 
55 #include "qautoptr_p.h"
56 #include "qcachecells_p.h"
58 #include "qitem_p.h"
59 #include "qnamepool_p.h"
60 #include "qnodebuilder_p.h"
61 #include "qprimitives_p.h"
62 #include "qreportcontext_p.h"
63 #include "qresourceloader_p.h"
64 
66 
68 
69 class QDateTime;
70 template<typename T> class QVector;
71 
72 namespace QPatternist
73 {
74  class DayTimeDuration;
75  class Expression;
76  class TemplateMode;
77 
89  {
90  public:
99 
100  virtual ~DynamicContext()
101  {
102  }
103 
109  virtual ItemCacheCell &itemCacheCell(const VariableSlotID slot) = 0;
110 
117 
118  virtual xsInteger contextPosition() const = 0;
119  virtual Item contextItem() const = 0;
120  virtual xsInteger contextSize() = 0;
121 
122  virtual void setRangeVariable(const VariableSlotID slot,
123  const Item &newValue) = 0;
124  virtual Item rangeVariable(const VariableSlotID slot) const = 0;
125  virtual void setExpressionVariable(const VariableSlotID slot,
126  const QExplicitlySharedDataPointer<Expression> &newValue) = 0;
128  expressionVariable(const VariableSlotID slot) const = 0;
129 
130  virtual Item::Iterator::Ptr positionIterator(const VariableSlotID slot) const = 0;
131  virtual void setPositionIterator(const VariableSlotID slot,
132  const Item::Iterator::Ptr &newValue) = 0;
133 
134  virtual void setFocusIterator(const Item::Iterator::Ptr &it) = 0;
135  virtual Item::Iterator::Ptr focusIterator() const = 0;
136 
138  virtual QDateTime currentDateTime() const = 0;
139 
140  virtual QAbstractXmlReceiver *outputReceiver() const = 0;
141  virtual NodeBuilder::Ptr nodeBuilder(const QUrl &baseURI) const = 0;
142  virtual ResourceLoader::Ptr resourceLoader() const = 0;
144  virtual NamePool::Ptr namePool() const = 0;
145 
154  virtual Item currentItem() const = 0;
155 
159 
170  virtual void addNodeModel(const QAbstractXmlNodeModel::Ptr &nm) = 0;
171 
189  virtual ItemCacheCell &globalItemCacheCell(const VariableSlotID slot) = 0;
190 
201  virtual TemplateParameterHash &templateParameterStore() = 0;
202 
210 
215  virtual DynamicContext::Ptr previousContext() const = 0;
216 
224  };
225 }
226 
228 
230 
231 #endif
qint32 VariableSlotID
virtual NamePool::Ptr namePool() const =0
virtual void addNodeModel(const QAbstractXmlNodeModel::Ptr &nm)=0
A push interface for the XPath Data Model. Similar to SAX&#39;s ContentHandler.
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
QHash< QXmlName, QExplicitlySharedDataPointer< Expression > > TemplateParameterHash
Carries template parameters at runtime.
#define QT_BEGIN_HEADER
Definition: qglobal.h:136
#define it(className, varName)
virtual QExplicitlySharedDataPointer< DayTimeDuration > implicitTimezone() const =0
qint64 xsInteger
virtual ItemSequenceCacheCell::Vector & globalItemSequenceCacheCells(const VariableSlotID slot)=0
Due to strong interdependencies, this file contains the definitions for the classes Item...
virtual Item rangeVariable(const VariableSlotID slot) const =0
DynamicContext::Ptr createStack()
virtual Item::Iterator::Ptr positionIterator(const VariableSlotID slot) const =0
virtual void setExpressionVariable(const VariableSlotID slot, const QExplicitlySharedDataPointer< Expression > &newValue)=0
The QUrl class provides a convenient interface for working with URLs.
Definition: qurl.h:61
The QHash class is a template class that provides a hash-table-based dictionary.
Definition: qdatastream.h:66
virtual xsInteger contextPosition() const =0
The QVector class is a template class that provides a dynamic array.
Definition: qdatastream.h:64
virtual void setPositionIterator(const VariableSlotID slot, const Item::Iterator::Ptr &newValue)=0
DynamicContext::Ptr createFocus()
virtual Item contextItem() const =0
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
virtual ItemSequenceCacheCell::Vector & itemSequenceCacheCells(const VariableSlotID slot)=0
virtual DynamicContext::Ptr previousContext() const =0
Returns the previous DynamicContext. If this context is the top-level one, null is returned...
The namespace for the internal API of QtXmlPatterns.
virtual void setFocusIterator(const Item::Iterator::Ptr &it)=0
Represents a cache entry for a single Item, as opposed to for a sequence of items.
Definition: qcachecells_p.h:81
virtual void setRangeVariable(const VariableSlotID slot, const Item &newValue)=0
virtual ItemCacheCell & globalItemCacheCell(const VariableSlotID slot)=0
virtual QExplicitlySharedDataPointer< Expression > expressionVariable(const VariableSlotID slot) const =0
The QDateTime class provides date and time functions.
Definition: qdatetime.h:216
Represents an item in the XPath 2.0 Data Model.
Definition: qitem_p.h:182
virtual ExternalVariableLoader::Ptr externalVariableLoader() const =0
virtual Item::Iterator::Ptr focusIterator() const =0
QExplicitlySharedDataPointer< DynamicContext > Ptr
Contains enumerators and typedefs applying for Patternist on a global scale, as well as central docum...
DynamicContext::Ptr createReceiverContext(QAbstractXmlReceiver *const receiver)
virtual NodeBuilder::Ptr nodeBuilder(const QUrl &baseURI) const =0
A callback for reporting errors.
virtual QAbstractXmlReceiver * outputReceiver() const =0
virtual QExplicitlySharedDataPointer< TemplateMode > currentTemplateMode() const =0
Returns the current template mode that is in effect.
virtual Item currentItem() const =0
Returns the item that fn:current() returns.
virtual ItemCacheCell & itemCacheCell(const VariableSlotID slot)=0
#define QT_END_HEADER
Definition: qglobal.h:137
virtual ResourceLoader::Ptr resourceLoader() const =0
Carries information and facilities used at runtime, and hence provides a state for that stage in a th...
virtual xsInteger contextSize()=0
virtual TemplateParameterHash & templateParameterStore()=0
When a template is called, this member carries the template parameters.
virtual QDateTime currentDateTime() const =0