src/xmlpatterns/functions/qcontextfns_p.h
changeset 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
-1:000000000000 0:1918ee327afb
       
     1 /****************************************************************************
       
     2 **
       
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     4 ** All rights reserved.
       
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
       
     6 **
       
     7 ** This file is part of the QtXmlPatterns module of the Qt Toolkit.
       
     8 **
       
     9 ** $QT_BEGIN_LICENSE:LGPL$
       
    10 ** No Commercial Usage
       
    11 ** This file contains pre-release code and may not be distributed.
       
    12 ** You may use this file in accordance with the terms and conditions
       
    13 ** contained in the Technology Preview License Agreement accompanying
       
    14 ** this package.
       
    15 **
       
    16 ** GNU Lesser General Public License Usage
       
    17 ** Alternatively, this file may be used under the terms of the GNU Lesser
       
    18 ** General Public License version 2.1 as published by the Free Software
       
    19 ** Foundation and appearing in the file LICENSE.LGPL included in the
       
    20 ** packaging of this file.  Please review the following information to
       
    21 ** ensure the GNU Lesser General Public License version 2.1 requirements
       
    22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
       
    23 **
       
    24 ** In addition, as a special exception, Nokia gives you certain additional
       
    25 ** rights.  These rights are described in the Nokia Qt LGPL Exception
       
    26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
       
    27 **
       
    28 ** If you have questions regarding the use of this file, please contact
       
    29 ** Nokia at qt-info@nokia.com.
       
    30 **
       
    31 **
       
    32 **
       
    33 **
       
    34 **
       
    35 **
       
    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_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 
       
    66 QT_BEGIN_HEADER
       
    67 
       
    68 QT_BEGIN_NAMESPACE
       
    69 
       
    70 namespace 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 <frans.englich@nokia.com>
       
    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 <frans.englich@nokia.com>
       
    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 <frans.englich@nokia.com>
       
   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 <frans.englich@nokia.com>
       
   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 <frans.englich@nokia.com>
       
   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 <frans.englich@nokia.com>
       
   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 <frans.englich@nokia.com>
       
   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 <frans.englich@nokia.com>
       
   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 
       
   191 QT_END_NAMESPACE
       
   192 
       
   193 QT_END_HEADER
       
   194 
       
   195 #endif