Qt 4.8
qdelegatingdynamiccontext.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 #include <QDateTime>
43 
44 #include "qdaytimeduration_p.h"
45 #include "qtemplatemode_p.h"
46 
48 
50 
51 using namespace QPatternist;
52 
54  : m_prevContext(prevContext)
55 {
57 }
58 
60 {
61  return m_prevContext->itemCacheCell(slot);
62 }
63 
65 {
67 }
68 
70 {
72 }
73 
75 {
76  return m_prevContext->contextItem();
77 }
78 
80 {
81  return m_prevContext->contextSize();
82 }
83 
85 {
87 }
88 
90 {
91  return m_prevContext->positionIterator(slot);
92 }
93 
95  const Item::Iterator::Ptr &newValue)
96 {
97  m_prevContext->setPositionIterator(slot, newValue);
98 }
99 
101  const Item &newValue)
102 {
103  m_prevContext->setRangeVariable(slotNumber, newValue);
104 }
105 
107 {
108  return m_prevContext->focusIterator();
109 }
110 
112 {
113  return m_prevContext->rangeVariable(slotNumber);
114 }
115 
117  const Expression::Ptr &newValue)
118 {
119  m_prevContext->setExpressionVariable(slotNumber, newValue);
120 }
121 
123 {
124  return m_prevContext->expressionVariable(slotNumber);
125 }
126 
128 {
129  return m_prevContext->messageHandler();
130 }
131 
133 {
135 }
136 
138 {
139  return m_prevContext->currentDateTime();
140 }
141 
143 {
144  return m_prevContext->outputReceiver();
145 }
146 
148 {
149  return m_prevContext->nodeBuilder(baseURI);
150 }
151 
153 {
154  return m_prevContext->resourceLoader();
155 }
156 
158 {
160 }
161 
163 {
164  return m_prevContext->namePool();
165 }
166 
168 {
169  return m_prevContext->locationFor(reflection);
170 }
171 
173 {
175 }
176 
178 {
179  return m_prevContext->uriResolver();
180 }
181 
183 {
184  return m_prevContext->globalItemCacheCell(slot);
185 }
186 
188 {
190 }
191 
193 {
194  return m_prevContext->currentItem();
195 }
196 
198 {
200 }
201 
203 {
204  return m_prevContext;
205 }
206 
208 {
210 }
211 
qint32 VariableSlotID
virtual QExplicitlySharedDataPointer< DayTimeDuration > implicitTimezone() const
virtual NamePool::Ptr namePool() const =0
DelegatingDynamicContext(const DynamicContext::Ptr &prevContext)
virtual void addNodeModel(const QAbstractXmlNodeModel::Ptr &nm)=0
virtual Item currentItem() const
Returns the item that fn:current() returns.
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
virtual ItemSequenceCacheCell::Vector & globalItemSequenceCacheCells(const VariableSlotID slot)
#define it(className, varName)
virtual QExplicitlySharedDataPointer< DayTimeDuration > implicitTimezone() const =0
qint64 xsInteger
virtual ItemSequenceCacheCell::Vector & globalItemSequenceCacheCells(const VariableSlotID slot)=0
virtual Item rangeVariable(const VariableSlotID slot) const =0
virtual TemplateParameterHash & templateParameterStore()
When a template is called, this member carries the template parameters.
virtual Item::Iterator::Ptr positionIterator(const VariableSlotID slot) const
virtual DynamicContext::Ptr previousContext() const
Returns the previous DynamicContext. If this context is the top-level one, null is returned...
virtual QExplicitlySharedDataPointer< TemplateMode > currentTemplateMode() const
Returns the current template mode that is in effect.
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
virtual xsInteger contextPosition() const =0
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
virtual void setPositionIterator(const VariableSlotID slot, const Item::Iterator::Ptr &newValue)=0
virtual ItemSequenceCacheCell::Vector & itemSequenceCacheCells(const VariableSlotID slot)
virtual const QAbstractUriResolver * uriResolver() const
The URI resolver in use.
virtual Item contextItem() const =0
The QAbstractUriResolver class is a callback interface for resolving Uniform Resource Identifiers...
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
virtual ItemCacheCell & globalItemCacheCell(const VariableSlotID slot)
virtual void setFocusIterator(const Item::Iterator::Ptr &it)
virtual void setRangeVariable(const VariableSlotID slotNumber, const Item &newValue)
virtual ResourceLoader::Ptr resourceLoader() const
virtual ItemSequenceCacheCell::Vector & itemSequenceCacheCells(const VariableSlotID slot)=0
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
The QSourceLocation class identifies a location in a resource by URI, line, and column.
virtual void setRangeVariable(const VariableSlotID slot, const Item &newValue)=0
virtual void addNodeModel(const QAbstractXmlNodeModel::Ptr &nm)
virtual QSourceLocation locationFor(const SourceLocationReflection *const reflection) const =0
Returns the source location applying for reflection.
virtual ExternalVariableLoader::Ptr externalVariableLoader() const
virtual ItemCacheCell & globalItemCacheCell(const VariableSlotID slot)=0
virtual QAbstractMessageHandler * messageHandler() const =0
virtual Item rangeVariable(const VariableSlotID slotNumber) const
virtual QExplicitlySharedDataPointer< Expression > expressionVariable(const VariableSlotID slot) const =0
virtual NodeBuilder::Ptr nodeBuilder(const QUrl &baseURI) const
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 QSourceLocation locationFor(const SourceLocationReflection *const reflection) const
Returns the source location applying for reflection.
The QAbstractMessageHandler class provides a callback interface for handling messages.
virtual ExternalVariableLoader::Ptr externalVariableLoader() const =0
virtual Item::Iterator::Ptr focusIterator() const =0
virtual ItemCacheCell & itemCacheCell(const VariableSlotID slot)
virtual NodeBuilder::Ptr nodeBuilder(const QUrl &baseURI) const =0
virtual Expression::Ptr expressionVariable(const VariableSlotID slotNumber) const
virtual const QAbstractUriResolver * uriResolver() const =0
The URI resolver in use.
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 QAbstractMessageHandler * messageHandler() const
virtual ItemCacheCell & itemCacheCell(const VariableSlotID slot)=0
virtual void setExpressionVariable(const VariableSlotID slotNumber, const Expression::Ptr &newValue)
virtual Item::Iterator::Ptr focusIterator() const
virtual ResourceLoader::Ptr resourceLoader() const =0
Base class for all instances that represents something at a certain location.
virtual xsInteger contextSize()=0
virtual TemplateParameterHash & templateParameterStore()=0
When a template is called, this member carries the template parameters.
virtual QAbstractXmlReceiver * outputReceiver() const
virtual QDateTime currentDateTime() const =0
virtual void setPositionIterator(const VariableSlotID slot, const Item::Iterator::Ptr &newValue)