source: trunk/tools/assistant/lib/fulltextsearch/qterm_p.h

Last change on this file was 846, checked in by Dmitry A. Kuminov, 14 years ago

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

File size: 2.6 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team.
4** All rights reserved.
5**
6** Portion Copyright (C) 2011 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 QTERM_P_H
19#define QTERM_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/QSharedData>
35#include <QtCore/QString>
36#include <QtCore/QSharedDataPointer>
37
38CL_NS_DEF(index)
39 class Term;
40CL_NS_END
41CL_NS_USE(index)
42
43QT_BEGIN_NAMESPACE
44
45class QCLuceneTermQuery;
46class QCLuceneRangeQuery;
47class QCLucenePrefixQuery;
48class QCLuceneIndexReader;
49class QCLucenePhraseQuery;
50
51class QHELP_EXPORT QCLuceneTermPrivate : public QSharedData
52{
53public:
54 QCLuceneTermPrivate();
55 QCLuceneTermPrivate(const QCLuceneTermPrivate &other);
56
57 ~QCLuceneTermPrivate();
58
59 Term *term;
60 bool deleteCLuceneTerm;
61
62private:
63 QCLuceneTermPrivate &operator=(const QCLuceneTermPrivate &other);
64};
65
66class QHELP_EXPORT QCLuceneTerm
67{
68public:
69 QCLuceneTerm();
70 QCLuceneTerm(const QString &field, const QString &text);
71 QCLuceneTerm(const QCLuceneTerm &fieldTerm, const QString &text);
72
73 virtual ~QCLuceneTerm();
74
75 QString field() const;
76 QString text() const;
77
78 void set(const QString &field, const QString &text);
79 void set(const QCLuceneTerm &fieldTerm, const QString &text);
80 void set(const QString &field, const QString &text, bool internField);
81
82 bool equals(const QCLuceneTerm &other) const;
83 qint32 compareTo(const QCLuceneTerm &other) const;
84
85 QString toString() const;
86 quint32 hashCode() const;
87 quint32 textLength() const;
88
89protected:
90 friend class QCLuceneTermQuery;
91 friend class QCLuceneRangeQuery;
92 friend class QCLucenePrefixQuery;
93 friend class QCLuceneIndexReader;
94 friend class QCLucenePhraseQuery;
95 QSharedDataPointer<QCLuceneTermPrivate> d;
96};
97
98QT_END_NAMESPACE
99
100#endif // QTERM_P_H
Note: See TracBrowser for help on using the repository browser.