| 1 | /**************************************************************************** |
|---|---|
| 2 | ** |
| 3 | ** Copyright (C) 2016 The Qt Company Ltd. |
| 4 | ** Contact: https://www.qt.io/licensing/ |
| 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 The Qt Company. For licensing terms |
| 14 | ** and conditions see https://www.qt.io/terms-conditions. For further |
| 15 | ** information use the contact form at https://www.qt.io/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 3 as published by the Free Software |
| 20 | ** Foundation and appearing in the file LICENSE.LGPL3 included in the |
| 21 | ** packaging of this file. Please review the following information to |
| 22 | ** ensure the GNU Lesser General Public License version 3 requirements |
| 23 | ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. |
| 24 | ** |
| 25 | ** GNU General Public License Usage |
| 26 | ** Alternatively, this file may be used under the terms of the GNU |
| 27 | ** General Public License version 2.0 or (at your option) the GNU General |
| 28 | ** Public license version 3 or any later version approved by the KDE Free |
| 29 | ** Qt Foundation. The licenses are as published by the Free Software |
| 30 | ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 |
| 31 | ** included in the packaging of this file. Please review the following |
| 32 | ** information to ensure the GNU General Public License requirements will |
| 33 | ** be met: https://www.gnu.org/licenses/gpl-2.0.html and |
| 34 | ** https://www.gnu.org/licenses/gpl-3.0.html. |
| 35 | ** |
| 36 | ** $QT_END_LICENSE$ |
| 37 | ** |
| 38 | ****************************************************************************/ |
| 39 | |
| 40 | /* Patternist */ |
| 41 | #include "qbasictypesfactory_p.h" |
| 42 | #include "qfunctionfactorycollection_p.h" |
| 43 | #include "qgenericnamespaceresolver_p.h" |
| 44 | #include "qcommonnamespaces_p.h" |
| 45 | #include "qgenericdynamiccontext_p.h" |
| 46 | |
| 47 | #include "qstaticfocuscontext_p.h" |
| 48 | |
| 49 | QT_BEGIN_NAMESPACE |
| 50 | |
| 51 | using namespace QPatternist; |
| 52 | |
| 53 | DelegatingStaticContext::DelegatingStaticContext(const StaticContext::Ptr &context) : m_context(context) |
| 54 | { |
| 55 | Q_ASSERT(context); |
| 56 | } |
| 57 | |
| 58 | NamespaceResolver::Ptr DelegatingStaticContext::namespaceBindings() const |
| 59 | { |
| 60 | return m_context->namespaceBindings(); |
| 61 | } |
| 62 | |
| 63 | FunctionFactory::Ptr DelegatingStaticContext::functionSignatures() const |
| 64 | { |
| 65 | return m_context->functionSignatures(); |
| 66 | } |
| 67 | |
| 68 | DynamicContext::Ptr DelegatingStaticContext::dynamicContext() const |
| 69 | { |
| 70 | return m_context->dynamicContext(); |
| 71 | } |
| 72 | |
| 73 | SchemaTypeFactory::Ptr DelegatingStaticContext::schemaDefinitions() const |
| 74 | { |
| 75 | return m_context->schemaDefinitions(); |
| 76 | } |
| 77 | |
| 78 | QUrl DelegatingStaticContext::baseURI() const |
| 79 | { |
| 80 | return m_context->baseURI(); |
| 81 | } |
| 82 | |
| 83 | void DelegatingStaticContext::setBaseURI(const QUrl &uri) |
| 84 | { |
| 85 | m_context->setBaseURI(uri); |
| 86 | } |
| 87 | |
| 88 | bool DelegatingStaticContext::compatModeEnabled() const |
| 89 | { |
| 90 | return m_context->compatModeEnabled(); |
| 91 | } |
| 92 | |
| 93 | QUrl DelegatingStaticContext::defaultCollation() const |
| 94 | { |
| 95 | return m_context->defaultCollation(); |
| 96 | } |
| 97 | |
| 98 | QAbstractMessageHandler * DelegatingStaticContext::messageHandler() const |
| 99 | { |
| 100 | return m_context->messageHandler(); |
| 101 | } |
| 102 | |
| 103 | void DelegatingStaticContext::setDefaultCollation(const QUrl &uri) |
| 104 | { |
| 105 | m_context->setDefaultCollation(uri); |
| 106 | } |
| 107 | |
| 108 | void DelegatingStaticContext::setNamespaceBindings(const NamespaceResolver::Ptr &resolver) |
| 109 | { |
| 110 | m_context->setNamespaceBindings(resolver); |
| 111 | } |
| 112 | |
| 113 | StaticContext::BoundarySpacePolicy DelegatingStaticContext::boundarySpacePolicy() const |
| 114 | { |
| 115 | return m_context->boundarySpacePolicy(); |
| 116 | } |
| 117 | |
| 118 | void DelegatingStaticContext::setBoundarySpacePolicy(const BoundarySpacePolicy policy) |
| 119 | { |
| 120 | m_context->setBoundarySpacePolicy(policy); |
| 121 | } |
| 122 | |
| 123 | StaticContext::ConstructionMode DelegatingStaticContext::constructionMode() const |
| 124 | { |
| 125 | return m_context->constructionMode(); |
| 126 | } |
| 127 | |
| 128 | void DelegatingStaticContext::setConstructionMode(const ConstructionMode mode) |
| 129 | { |
| 130 | m_context->setConstructionMode(mode); |
| 131 | } |
| 132 | |
| 133 | StaticContext::OrderingMode DelegatingStaticContext::orderingMode() const |
| 134 | { |
| 135 | return m_context->orderingMode(); |
| 136 | } |
| 137 | |
| 138 | void DelegatingStaticContext::setOrderingMode(const OrderingMode mode) |
| 139 | { |
| 140 | m_context->setOrderingMode(mode); |
| 141 | } |
| 142 | |
| 143 | StaticContext::OrderingEmptySequence DelegatingStaticContext::orderingEmptySequence() const |
| 144 | { |
| 145 | return m_context->orderingEmptySequence(); |
| 146 | } |
| 147 | |
| 148 | void DelegatingStaticContext::setOrderingEmptySequence(const OrderingEmptySequence ordering) |
| 149 | { |
| 150 | m_context->setOrderingEmptySequence(ordering); |
| 151 | } |
| 152 | |
| 153 | QString DelegatingStaticContext::defaultFunctionNamespace() const |
| 154 | { |
| 155 | return m_context->defaultFunctionNamespace(); |
| 156 | } |
| 157 | |
| 158 | void DelegatingStaticContext::setDefaultFunctionNamespace(const QString &ns) |
| 159 | { |
| 160 | m_context->setDefaultFunctionNamespace(ns); |
| 161 | } |
| 162 | |
| 163 | QString DelegatingStaticContext::defaultElementNamespace() const |
| 164 | { |
| 165 | return m_context->defaultElementNamespace(); |
| 166 | } |
| 167 | |
| 168 | void DelegatingStaticContext::setDefaultElementNamespace(const QString &ns) |
| 169 | { |
| 170 | m_context->setDefaultElementNamespace(ns); |
| 171 | } |
| 172 | |
| 173 | StaticContext::InheritMode DelegatingStaticContext::inheritMode() const |
| 174 | { |
| 175 | return m_context->inheritMode(); |
| 176 | } |
| 177 | |
| 178 | void DelegatingStaticContext::setInheritMode(const InheritMode mode) |
| 179 | { |
| 180 | m_context->setInheritMode(mode); |
| 181 | } |
| 182 | |
| 183 | StaticContext::PreserveMode DelegatingStaticContext::preserveMode() const |
| 184 | { |
| 185 | return m_context->preserveMode(); |
| 186 | } |
| 187 | |
| 188 | void DelegatingStaticContext::setPreserveMode(const PreserveMode mode) |
| 189 | { |
| 190 | m_context->setPreserveMode(mode); |
| 191 | } |
| 192 | |
| 193 | ItemType::Ptr DelegatingStaticContext::contextItemType() const |
| 194 | { |
| 195 | return m_context->contextItemType(); |
| 196 | } |
| 197 | |
| 198 | ItemType::Ptr DelegatingStaticContext::currentItemType() const |
| 199 | { |
| 200 | return m_context->currentItemType(); |
| 201 | } |
| 202 | |
| 203 | ExternalVariableLoader::Ptr DelegatingStaticContext::externalVariableLoader() const |
| 204 | { |
| 205 | return m_context->externalVariableLoader(); |
| 206 | } |
| 207 | |
| 208 | StaticContext::Ptr DelegatingStaticContext::copy() const |
| 209 | { |
| 210 | return StaticContext::Ptr(new DelegatingStaticContext(m_context->copy())); |
| 211 | } |
| 212 | |
| 213 | ResourceLoader::Ptr DelegatingStaticContext::resourceLoader() const |
| 214 | { |
| 215 | return m_context->resourceLoader(); |
| 216 | } |
| 217 | |
| 218 | NamePool::Ptr DelegatingStaticContext::namePool() const |
| 219 | { |
| 220 | return m_context->namePool(); |
| 221 | } |
| 222 | |
| 223 | void DelegatingStaticContext::addLocation(const SourceLocationReflection *const reflection, |
| 224 | const QSourceLocation &location) |
| 225 | { |
| 226 | m_context->addLocation(reflection, location); |
| 227 | } |
| 228 | |
| 229 | StaticContext::LocationHash DelegatingStaticContext::sourceLocations() const |
| 230 | { |
| 231 | return m_context->sourceLocations(); |
| 232 | } |
| 233 | |
| 234 | QSourceLocation DelegatingStaticContext::locationFor(const SourceLocationReflection *const reflection) const |
| 235 | { |
| 236 | return m_context->locationFor(reflection); |
| 237 | } |
| 238 | |
| 239 | const QAbstractUriResolver *DelegatingStaticContext::uriResolver() const |
| 240 | { |
| 241 | return m_context->uriResolver(); |
| 242 | } |
| 243 | |
| 244 | VariableSlotID DelegatingStaticContext::currentRangeSlot() const |
| 245 | { |
| 246 | return m_context->currentRangeSlot(); |
| 247 | } |
| 248 | |
| 249 | VariableSlotID DelegatingStaticContext::allocateRangeSlot() |
| 250 | { |
| 251 | return m_context->allocateRangeSlot(); |
| 252 | } |
| 253 | |
| 254 | void DelegatingStaticContext::setCompatModeEnabled(const bool newVal) |
| 255 | { |
| 256 | m_context->setCompatModeEnabled(newVal); |
| 257 | } |
| 258 | |
| 259 | QT_END_NAMESPACE |
| 260 |
