Qt 4.8
qresourceloader.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 <QUrl>
43 
44 
45 #include "qresourceloader_p.h"
46 
48 
49 using namespace QPatternist;
50 
52 {
53 }
54 
56  const QString &encoding)
57 {
58  Q_ASSERT(uri.isValid());
59  Q_ASSERT(!uri.isRelative());
60  Q_UNUSED(uri); /* Needed when compiling in release mode. */
61  Q_UNUSED(encoding);
62  return false;
63 }
64 
66 {
67  Q_ASSERT(uri.isValid());
68  Q_ASSERT(!uri.isRelative());
69  Q_UNUSED(uri); /* Needed when compiling in release mode. */
70  return ItemType::Ptr();
71 }
72 
74  const QString &encoding,
75  const ReportContext::Ptr &context,
76  const SourceLocationReflection *const where)
77 {
78  Q_ASSERT(uri.isValid());
79  Q_ASSERT(!uri.isRelative());
80  Q_UNUSED(uri); /* Needed when compiling in release mode. */
81  Q_UNUSED(encoding);
82  Q_UNUSED(context);
83  Q_UNUSED(where);
84  return Item();
85 }
86 
88  const ReportContext::Ptr &context)
89 {
90  Q_ASSERT(uri.isValid());
91  Q_ASSERT(!uri.isRelative());
92  Q_UNUSED(uri); /* Needed when compiling in release mode. */
93  Q_UNUSED(context); /* Needed when compiling in release mode. */
94  return Item();
95 }
96 
98 {
99  Q_ASSERT(uri.isValid());
100  Q_ASSERT(!uri.isRelative());
101  Q_UNUSED(uri); /* Needed when compiling in release mode. */
102  return SequenceType::Ptr();
103 }
104 
106 {
107  Q_ASSERT(uri.isValid());
108  Q_ASSERT(!uri.isRelative());
109  Q_UNUSED(uri); /* Needed when compiling in release mode. */
110  return false;
111 }
112 
114 {
115  Q_ASSERT(uri.isValid());
116  Q_ASSERT(!uri.isRelative());
117  Q_UNUSED(uri); /* Needed when compiling in release mode. */
118  return Item::Iterator::Ptr();
119 }
120 
122 {
123  Q_ASSERT(uri.isValid());
124  Q_ASSERT(!uri.isRelative());
125  Q_UNUSED(uri); /* Needed when compiling in release mode. */
126  return SequenceType::Ptr();
127 }
128 
129 void ResourceLoader::clear(const QUrl &uri)
130 {
131  Q_UNUSED(uri);
132 }
133 
virtual bool isUnparsedTextAvailable(const QUrl &uri, const QString &encoding)
Calls to this function are generated by calls to the fn:unparsed-text-available() function...
virtual bool isDocumentAvailable(const QUrl &uri)
Calls to this function are generated by calls to the fn:doc-available() function. ...
bool isValid() const
Returns true if the URL is valid; otherwise returns false.
Definition: qurl.cpp:4303
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
virtual Item openUnparsedText(const QUrl &uri, const QString &encoding, const ReportContext::Ptr &context, const SourceLocationReflection *const where)
Calls to this function are generated by calls to the fn:unparsed-text() function. ...
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
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
bool isRelative() const
Returns true if the URL is relative; otherwise returns false.
Definition: qurl.cpp:5880
virtual SequenceType::Ptr announceDocument(const QUrl &uri, const Usage usageHint)
May be called by the compilation framework at compile time to report that an XML document referenced ...
QExplicitlySharedDataPointer< QAbstractXmlForwardIterator< Item > > Ptr
A smart pointer wrapping an instance of a QAbstractXmlForwardIterator subclass.
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
The namespace for the internal API of QtXmlPatterns.
QExplicitlySharedDataPointer< ItemType > Ptr
Definition: qitemtype_p.h:88
Represents an item in the XPath 2.0 Data Model.
Definition: qitem_p.h:182
QExplicitlySharedDataPointer< const SequenceType > Ptr
virtual void clear(const QUrl &uri)
Asks to unload uri from its document pool, such that a subsequent request will require a new read...
virtual Item::Iterator::Ptr openCollection(const QUrl &uri)
Calls to this function are generated by calls to the fn:collection() function.
virtual SequenceType::Ptr announceCollection(const QUrl &uri)
May be called by the compilation framework at compile time to report that an node collection referenc...
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729
virtual ItemType::Ptr announceUnparsedText(const QUrl &uri)
May be called by the compilation framework at compile time to report that an unparsed text(plain text...
virtual Item openDocument(const QUrl &uri, const ReportContext::Ptr &context)
Calls to this function are generated by calls to the fn:document() or fn:doc() function.
Base class for all instances that represents something at a certain location.