tools/assistant/lib/fulltextsearch/qreader_p.h
changeset 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
-1:000000000000 0:1918ee327afb
       
     1 /****************************************************************************
       
     2 **
       
     3 ** Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team.
       
     4 ** All rights reserved.
       
     5 **
       
     6 ** Portion Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     7 ** All rights reserved.
       
     8 **
       
     9 ** This file may be used under the terms of the GNU Lesser General Public
       
    10 ** License version 2.1 as published by the Free Software Foundation and
       
    11 ** appearing in the file LICENSE.LGPL included in the packaging of this file.
       
    12 ** Please review the following information to ensure the GNU Lesser General
       
    13 ** Public License version 2.1 requirements will be met:
       
    14 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
       
    15 **
       
    16 ****************************************************************************/
       
    17 
       
    18 #ifndef QREADER_P_H
       
    19 #define QREADER_P_H
       
    20 
       
    21 //
       
    22 //  W A R N I N G
       
    23 //  -------------
       
    24 //
       
    25 // This file is not part of the Qt API. It exists for the convenience
       
    26 // of the help generator tools. This header file may change from version
       
    27 // to version without notice, or even be removed.
       
    28 //
       
    29 // We mean it.
       
    30 //
       
    31 
       
    32 #include "qclucene_global_p.h"
       
    33 
       
    34 #include <QtCore/QString>
       
    35 #include <QtCore/QSharedDataPointer>
       
    36 #include <QtCore/QSharedData>
       
    37 
       
    38 CL_NS_DEF(util)
       
    39     class Reader;
       
    40 CL_NS_END
       
    41 CL_NS_USE(util)
       
    42 
       
    43 QT_BEGIN_NAMESPACE
       
    44 
       
    45 class QCLuceneField;
       
    46 class QCLuceneAnalyzer;
       
    47 class QCLuceneDocument;
       
    48 class QCLuceneQueryParser;
       
    49 class QCLuceneStandardTokenizer;
       
    50 
       
    51 class QHELP_EXPORT QCLuceneReaderPrivate : public QSharedData
       
    52 {
       
    53 public:
       
    54     QCLuceneReaderPrivate();
       
    55     QCLuceneReaderPrivate(const QCLuceneReaderPrivate &other);
       
    56 
       
    57     ~QCLuceneReaderPrivate();
       
    58 
       
    59     Reader* reader;
       
    60     bool deleteCLuceneReader;
       
    61 
       
    62 private:
       
    63     QCLuceneReaderPrivate &operator=(const QCLuceneReaderPrivate &other);
       
    64 };
       
    65 
       
    66 class QHELP_EXPORT QCLuceneReader
       
    67 {
       
    68 public:
       
    69     QCLuceneReader();
       
    70     virtual ~QCLuceneReader();
       
    71 
       
    72 protected:
       
    73     friend class QCLuceneField;
       
    74     friend class QCLuceneAnalyzer;
       
    75     friend class QCLuceneDocument;
       
    76     friend class QCLuceneQueryParser;
       
    77     friend class QCLuceneStandardTokenizer;
       
    78     QSharedDataPointer<QCLuceneReaderPrivate> d;
       
    79 };
       
    80 
       
    81 class QCLuceneStringReader : public QCLuceneReader
       
    82 {
       
    83 public:
       
    84     QCLuceneStringReader(const QString &value);
       
    85     QCLuceneStringReader(const QString &value, qint32 length);
       
    86     QCLuceneStringReader(const QString &value, qint32 length, bool copyData);
       
    87 
       
    88     ~QCLuceneStringReader();
       
    89 
       
    90 private:
       
    91     TCHAR *string;
       
    92 };
       
    93 
       
    94 class QHELP_EXPORT QCLuceneFileReader : public QCLuceneReader
       
    95 {
       
    96 public:
       
    97     QCLuceneFileReader(const QString &path, const QString &encoding,
       
    98                        qint32 cacheLength = 13, qint32 cacheBuffer = 14);
       
    99     ~QCLuceneFileReader();
       
   100 };
       
   101 
       
   102 QT_END_NAMESPACE
       
   103 
       
   104 #endif  // QREADER_P_H