[2] | 1 | /****************************************************************************
|
---|
| 2 | **
|
---|
[651] | 3 | ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
---|
[561] | 4 | ** All rights reserved.
|
---|
| 5 | ** Contact: Nokia Corporation ([email protected])
|
---|
[2] | 6 | **
|
---|
| 7 | ** This file is part of the QtXmlPatterns module of the Qt Toolkit.
|
---|
| 8 | **
|
---|
| 9 | ** $QT_BEGIN_LICENSE:LGPL$
|
---|
| 10 | ** Commercial Usage
|
---|
| 11 | ** Licensees holding valid Qt Commercial licenses may use this file in
|
---|
| 12 | ** accordance with the Qt Commercial License Agreement provided with the
|
---|
| 13 | ** Software or, alternatively, in accordance with the terms contained in
|
---|
| 14 | ** a written agreement between you and Nokia.
|
---|
| 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 | **
|
---|
[561] | 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.
|
---|
[2] | 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 | **
|
---|
[561] | 36 | ** If you have questions regarding the use of this file, please contact
|
---|
| 37 | ** Nokia at [email protected].
|
---|
[2] | 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 | /**
|
---|
| 53 | * @file
|
---|
| 54 | * @short Contains Doxygen documentation for groups.
|
---|
| 55 | */
|
---|
| 56 |
|
---|
| 57 | namespace QPatternist
|
---|
| 58 | {
|
---|
| 59 | /**
|
---|
| 60 | * @short The abstract syntax tree nodes that implements the builtin
|
---|
| 61 | * functions, such as @c fn:concat().
|
---|
| 62 | *
|
---|
| 63 | * @defgroup Patternist_functions Function Implementations
|
---|
[561] | 64 | * @author Frans Englich <[email protected]>
|
---|
[2] | 65 | */
|
---|
| 66 |
|
---|
| 67 | /**
|
---|
| 68 | * @short The abstract syntax tree nodes that is generated for XPath,
|
---|
| 69 | * XQuery, and XSL-T code.
|
---|
| 70 | *
|
---|
| 71 | * XPath's approach of compilation is traditional. An Abstract Syntax
|
---|
| 72 | * Tree(AST) is built, where the Expression class is the abstract base
|
---|
| 73 | * class for all kinds of implementations of expressions.
|
---|
| 74 | *
|
---|
| 75 | * What perhaps can be said to be characteristic for Patternist is that the
|
---|
| 76 | * base class, Expression, performs a lot of work, and that sub-classes
|
---|
| 77 | * declares what specific behaviors they need, which the Expression's
|
---|
| 78 | * functions then bring into action.
|
---|
| 79 | *
|
---|
| 80 | * XPath expressions often have different amount of operands. For example,
|
---|
| 81 | * the 'and' expression takes two, the context item(".") none, and the
|
---|
| 82 | * if-expression three. To help expression implementations with that, there
|
---|
| 83 | * exist the abstract EmptyContainer, SingleContainer, PairContainer,
|
---|
| 84 | * TripleContainer, and UnlimitedContainer classes for avoiding duplicating
|
---|
| 85 | * code.
|
---|
| 86 | *
|
---|
| 87 | * @defgroup Patternist_expressions Expressions
|
---|
[561] | 88 | * @author Frans Englich <[email protected]>
|
---|
[2] | 89 | */
|
---|
| 90 |
|
---|
| 91 | /**
|
---|
| 92 | * @short Various classes that contains small utility functions.
|
---|
| 93 | *
|
---|
| 94 | * @defgroup Patternist Utility Classes
|
---|
[561] | 95 | * @author Frans Englich <[email protected]>
|
---|
[2] | 96 | */
|
---|
| 97 |
|
---|
| 98 | /**
|
---|
| 99 | * @short Classes for the type system in the XQuery & XSL-T language.
|
---|
| 100 | *
|
---|
| 101 | * @defgroup Patternist_types Type system
|
---|
[561] | 102 | * @author Frans Englich <[email protected]>
|
---|
[2] | 103 | */
|
---|
| 104 |
|
---|
| 105 | /**
|
---|
| 106 | * @defgroup Patternist_xdm XQuery/XPath Data Model
|
---|
[561] | 107 | * @author Frans Englich <[email protected]>
|
---|
[2] | 108 | */
|
---|
| 109 |
|
---|
| 110 | /**
|
---|
| 111 | * @short Patternist's family of iterators in one of the most central parts
|
---|
| 112 | * of Patternist's API, and are responsible for carrying, and typically
|
---|
| 113 | * also creating, data.
|
---|
| 114 | *
|
---|
| 115 | * An iterator, which always is an Iterator sub-class, is similar to a
|
---|
| 116 | * Java-style iterator. What signifies Patternist's iterators is that they
|
---|
| 117 | * almost always contains business logic(which is the cause to their
|
---|
| 118 | * efficiency).
|
---|
| 119 | *
|
---|
| 120 | * An example which illustrates this principle is the RangeIterator. When
|
---|
| 121 | * the RangeExpression is told to create a sequence of integers between 1
|
---|
| 122 | * and 1000, it doesn't enter a loop that allocates 1000 Integer instances,
|
---|
| 123 | * but instead return an RangeIterator that incrementally creates the
|
---|
| 124 | * numbers when asked to do so via its RangeIterator::next() function. If
|
---|
| 125 | * it turns out that the expression that has the range expression as
|
---|
| 126 | * operand only needs three items from it, that is what gets created, not
|
---|
| 127 | * 1000.
|
---|
| 128 | *
|
---|
| 129 | * All iterators operates by that principle, perhaps suitably labeled as
|
---|
| 130 | * "pull-based", "lazy loaded" or "serialized". Central for the XPath
|
---|
| 131 | * language is that it filters and selects data, and the iterators supports
|
---|
| 132 | * this well by letting the demand of the filter expressions(the callees)
|
---|
| 133 | * decide how "much" source that gets computed. In this way the evaluation
|
---|
| 134 | * of an expression tree can lead to a chain of pipelined iterators, where
|
---|
| 135 | * the first asks the second for data and then performs its specific
|
---|
| 136 | * operations, the second subsequently asks the third, and so forth.
|
---|
| 137 | *
|
---|
| 138 | * However, the iterators are not limited to be used for representing
|
---|
| 139 | * sequences of items in the XPath Data Model. The Iterator is
|
---|
| 140 | * parameterized on one argument, meaning any type of "units" can be
|
---|
| 141 | * iterated, be it Item or any other. One use of this is in the
|
---|
| 142 | * ExpressionSequence(which implements the comma operator) where it creates
|
---|
| 143 | * Iterator instances over Expression instances -- its operands. The
|
---|
| 144 | * parameterization is often used in combination with the MappingIterator
|
---|
| 145 | * and the MappingCallback.
|
---|
| 146 | *
|
---|
| 147 | * @defgroup Patternist_iterators Iterators
|
---|
[561] | 148 | * @author Frans Englich <[email protected]>
|
---|
[2] | 149 | */
|
---|
| 150 | }
|
---|