author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Fri, 19 Feb 2010 23:40:16 +0200 | |
branch | RCL_3 |
changeset 4 | 3b1da2848fc7 |
parent 0 | 1918ee327afb |
permissions | -rw-r--r-- |
0 | 1 |
/**************************************************************************** |
2 |
** |
|
3 |
** Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team. |
|
4 |
** All rights reserved. |
|
5 |
** |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6 |
** Portion Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 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 QDOCUMENT_P_H |
|
19 |
#define QDOCUMENT_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 "qfield_p.h" |
|
33 |
#include "qclucene_global_p.h" |
|
34 |
||
35 |
#include <QtCore/QList> |
|
36 |
#include <QtCore/QString> |
|
37 |
#include <QtCore/QStringList> |
|
38 |
#include <QtCore/QSharedDataPointer> |
|
39 |
#include <QtCore/QSharedData> |
|
40 |
||
41 |
CL_NS_DEF(document) |
|
42 |
class Document; |
|
43 |
CL_NS_END |
|
44 |
CL_NS_USE(document) |
|
45 |
||
46 |
QT_BEGIN_NAMESPACE |
|
47 |
||
48 |
class QCLuceneHits; |
|
49 |
class QCLuceneIndexReader; |
|
50 |
class QCLuceneIndexWriter; |
|
51 |
class QCLuceneIndexSearcher; |
|
52 |
class QCLuceneMultiSearcher; |
|
53 |
||
54 |
class QHELP_EXPORT QCLuceneDocumentPrivate : public QSharedData |
|
55 |
{ |
|
56 |
public: |
|
57 |
QCLuceneDocumentPrivate(); |
|
58 |
QCLuceneDocumentPrivate(const QCLuceneDocumentPrivate &other); |
|
59 |
||
60 |
~QCLuceneDocumentPrivate(); |
|
61 |
||
62 |
Document *document; |
|
63 |
bool deleteCLuceneDocument; |
|
64 |
||
65 |
private: |
|
66 |
QCLuceneDocumentPrivate &operator=(const QCLuceneDocumentPrivate &other); |
|
67 |
}; |
|
68 |
||
69 |
class QHELP_EXPORT QCLuceneDocument |
|
70 |
{ |
|
71 |
public: |
|
72 |
QCLuceneDocument(); |
|
73 |
~QCLuceneDocument(); |
|
74 |
||
75 |
void add(QCLuceneField *field); |
|
76 |
QCLuceneField* getField(const QString &name) const; |
|
77 |
QString get(const QString &name) const; |
|
78 |
QString toString() const; |
|
79 |
void setBoost(qreal boost); |
|
80 |
qreal getBoost() const; |
|
81 |
void removeField(const QString &name); |
|
82 |
void removeFields(const QString &name); |
|
83 |
QStringList getValues(const QString &name) const; |
|
84 |
void clear(); |
|
85 |
||
86 |
protected: |
|
87 |
friend class QCLuceneHits; |
|
88 |
friend class QCLuceneIndexReader; |
|
89 |
friend class QCLuceneIndexWriter; |
|
90 |
friend class QCLuceneIndexSearcher; |
|
91 |
friend class QCLuceneMultiSearcher; |
|
92 |
QSharedDataPointer<QCLuceneDocumentPrivate> d; |
|
93 |
||
94 |
private: |
|
95 |
mutable QList<QCLuceneField*> fieldList; |
|
96 |
}; |
|
97 |
||
98 |
QT_END_NAMESPACE |
|
99 |
||
100 |
#endif // QDOCUMENT_P_H |