source: trunk/src/xmlpatterns/functions/qcontextfns_p.h@ 5

Last change on this file since 5 was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 6.8 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4** Contact: Qt Software Information ([email protected])
5**
6** This file is part of the QtXmlPatterns module of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL$
9** Commercial Usage
10** Licensees holding valid Qt Commercial licenses may use this file in
11** accordance with the Qt Commercial License Agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and Nokia.
14**
15** GNU Lesser General Public License Usage
16** Alternatively, this file may be used under the terms of the GNU Lesser
17** General Public License version 2.1 as published by the Free Software
18** Foundation and appearing in the file LICENSE.LGPL included in the
19** packaging of this file. Please review the following information to
20** ensure the GNU Lesser General Public License version 2.1 requirements
21** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
22**
23** In addition, as a special exception, Nokia gives you certain
24** additional rights. These rights are described in the Nokia Qt LGPL
25** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
26** package.
27**
28** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you are unsure which license is appropriate for your use, please
37** contact the sales department at [email protected].
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_ContextFNs_H
53#define Patternist_ContextFNs_H
54
55#include "qfunctioncall_p.h"
56
57/**
58 * @file
59 * @short Contains classes implementing the functions found in
60 * <a href="http://www.w3.org/TR/xpath-functions/#context">XQuery 1.0 and
61 * XPath 2.0 Functions and Operators, 16 Context Functions</a>.
62 *
63 * @ingroup Patternist_functions
64 */
65
66QT_BEGIN_HEADER
67
68QT_BEGIN_NAMESPACE
69
70namespace QPatternist
71{
72 /**
73 * @short Implements the function <tt>fn:position()</tt>.
74 *
75 * @see <a href="http://www.w3.org/TR/xpath-functions/#func-position">XQuery 1.0
76 * and XPath 2.0 Functions and Operators, 16.1 fn:position</a>
77 * @ingroup Patternist_functions
78 * @author Frans Englich <[email protected]>
79 */
80 class PositionFN : public FunctionCall
81 {
82 public:
83 virtual Item evaluateSingleton(const DynamicContext::Ptr &context) const;
84 };
85
86 /**
87 * @short Implements the function <tt>fn:last()</tt>.
88 *
89 * @see <a href="http://www.w3.org/TR/xpath-functions/#func-last">XQuery 1.0
90 * and XPath 2.0 Functions and Operators, 16.2 fn:last</a>
91 * @ingroup Patternist_functions
92 * @author Frans Englich <[email protected]>
93 */
94 class LastFN : public FunctionCall
95 {
96 public:
97 virtual Item evaluateSingleton(const DynamicContext::Ptr &context) const;
98 };
99
100 /**
101 * @short Implements the function <tt>fn:implicit-timezone()</tt>.
102 *
103 * @see <a href="http://www.w3.org/TR/xpath-functions/#func-implicit-timezone">XQuery 1.0
104 * and XPath 2.0 Functions and Operators, 16.6 fn:implicit-timezone</a>
105 * @ingroup Patternist_functions
106 * @author Frans Englich <[email protected]>
107 */
108 class ImplicitTimezoneFN : public FunctionCall
109 {
110 public:
111 virtual Item evaluateSingleton(const DynamicContext::Ptr &context) const;
112 };
113
114 /**
115 * @short Implements the function <tt>fn:current-dateTime()</tt>.
116 *
117 * @see <a href="http://www.w3.org/TR/xpath-functions/#func-current-dateTime">XQuery 1.0
118 * and XPath 2.0 Functions and Operators, 16.3 fn:current-dateTime</a>
119 * @ingroup Patternist_functions
120 * @author Frans Englich <[email protected]>
121 */
122 class CurrentDateTimeFN : public FunctionCall
123 {
124 public:
125 virtual Item evaluateSingleton(const DynamicContext::Ptr &context) const;
126 };
127
128 /**
129 * @short Implements the function <tt>fn:current-date()</tt>.
130 *
131 * @see <a href="http://www.w3.org/TR/xpath-functions/#func-current-date">XQuery 1.0
132 * and XPath 2.0 Functions and Operators, 16.4 fn:current-date</a>
133 * @ingroup Patternist_functions
134 * @author Frans Englich <[email protected]>
135 */
136 class CurrentDateFN : public FunctionCall
137 {
138 public:
139 virtual Item evaluateSingleton(const DynamicContext::Ptr &context) const;
140 };
141
142 /**
143 * @short Implements the function <tt>fn:current-time()</tt>.
144 *
145 * @see <a href="http://www.w3.org/TR/xpath-functions/#func-current-time">XQuery 1.0
146 * and XPath 2.0 Functions and Operators, 16.5 fn:current-date</a>
147 * @ingroup Patternist_functions
148 * @author Frans Englich <[email protected]>
149 */
150 class CurrentTimeFN : public FunctionCall
151 {
152 public:
153 virtual Item evaluateSingleton(const DynamicContext::Ptr &context) const;
154 };
155
156 /**
157 * @short Implements the function <tt>fn:default-collation()</tt>.
158 *
159 * This is done by rewriting to StaticContext::defaultCollation() at the typeCheck() stage.
160 *
161 * @see <a href="http://www.w3.org/TR/xpath-functions/#func-default-collation">XQuery 1.0
162 * and XPath 2.0 Functions and Operators, 16.7 fn:default-collation</a>
163 * @ingroup Patternist_functions
164 * @author Frans Englich <[email protected]>
165 */
166 class DefaultCollationFN : public FunctionCall
167 {
168 public:
169 virtual Expression::Ptr typeCheck(const StaticContext::Ptr &context,
170 const SequenceType::Ptr &reqType);
171 };
172
173 /**
174 * @short Implements the function <tt>fn:static-base-uri()</tt>.
175 *
176 * This is done by rewriting to StaticContext::baseURI() at the typeCheck() stage.
177 *
178 * @see <a href="http://www.w3.org/TR/xpath-functions/#func-static-base-uri">XQuery 1.0
179 * and XPath 2.0 Functions and Operators, 16.8 fn:static-base-uri</a>
180 * @ingroup Patternist_functions
181 * @author Frans Englich <[email protected]>
182 */
183 class StaticBaseURIFN : public FunctionCall
184 {
185 public:
186 virtual Expression::Ptr typeCheck(const StaticContext::Ptr &context,
187 const SequenceType::Ptr &reqType);
188 };
189}
190
191QT_END_NAMESPACE
192
193QT_END_HEADER
194
195#endif
Note: See TracBrowser for help on using the repository browser.