source: trunk/tools/assistant/lib/fulltextsearch/qdocument_p.h@ 846

Last change on this file since 846 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 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
41CL_NS_DEF(document)
42 class Document;
43CL_NS_END
44CL_NS_USE(document)
45
46QT_BEGIN_NAMESPACE
47
48class QCLuceneHits;
49class QCLuceneIndexReader;
50class QCLuceneIndexWriter;
51class QCLuceneIndexSearcher;
52class QCLuceneMultiSearcher;
53
54class QHELP_EXPORT QCLuceneDocumentPrivate : public QSharedData
55{
56public:
57 QCLuceneDocumentPrivate();
58 QCLuceneDocumentPrivate(const QCLuceneDocumentPrivate &other);
59
60 ~QCLuceneDocumentPrivate();
61
62 Document *document;
63 bool deleteCLuceneDocument;
64
65private:
66 QCLuceneDocumentPrivate &operator=(const QCLuceneDocumentPrivate &other);
67};
68
69class QHELP_EXPORT QCLuceneDocument
70{
71public:
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
86protected:
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
94private:
95 mutable QList<QCLuceneField*> fieldList;
96};
97
98QT_END_NAMESPACE
99
100#endif // QDOCUMENT_P_H
Note: See TracBrowser for help on using the repository browser.