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

Last change on this file since 315 was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 2.3 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4** Contact: Qt Software Information ([email protected])
5**
6** This file is part of the QCLucene library and is distributable under
7** the terms of the LGPL license as specified in the license.txt file.
8**
9****************************************************************************/
10
11#ifndef QDOCUMENT_P_H
12#define QDOCUMENT_P_H
13
14//
15// W A R N I N G
16// -------------
17//
18// This file is not part of the Qt API. It exists for the convenience
19// of the help generator tools. This header file may change from version
20// to version without notice, or even be removed.
21//
22// We mean it.
23//
24
25#include "qfield_p.h"
26#include "qclucene_global_p.h"
27
28#include <QtCore/QList>
29#include <QtCore/QString>
30#include <QtCore/QStringList>
31#include <QtCore/QSharedDataPointer>
32#include <QtCore/QSharedData>
33
34CL_NS_DEF(document)
35 class Document;
36CL_NS_END
37CL_NS_USE(document)
38
39QT_BEGIN_NAMESPACE
40
41class QCLuceneHits;
42class QCLuceneIndexReader;
43class QCLuceneIndexWriter;
44class QCLuceneIndexSearcher;
45class QCLuceneMultiSearcher;
46
47class QHELP_EXPORT QCLuceneDocumentPrivate : public QSharedData
48{
49public:
50 QCLuceneDocumentPrivate();
51 QCLuceneDocumentPrivate(const QCLuceneDocumentPrivate &other);
52
53 ~QCLuceneDocumentPrivate();
54
55 Document *document;
56 bool deleteCLuceneDocument;
57
58private:
59 QCLuceneDocumentPrivate &operator=(const QCLuceneDocumentPrivate &other);
60};
61
62class QHELP_EXPORT QCLuceneDocument
63{
64public:
65 QCLuceneDocument();
66 ~QCLuceneDocument();
67
68 void add(QCLuceneField *field);
69 QCLuceneField* getField(const QString &name) const;
70 QString get(const QString &name) const;
71 QString toString() const;
72 void setBoost(qreal boost);
73 qreal getBoost() const;
74 void removeField(const QString &name);
75 void removeFields(const QString &name);
76 QStringList getValues(const QString &name) const;
77 void clear();
78
79protected:
80 friend class QCLuceneHits;
81 friend class QCLuceneIndexReader;
82 friend class QCLuceneIndexWriter;
83 friend class QCLuceneIndexSearcher;
84 friend class QCLuceneMultiSearcher;
85 QSharedDataPointer<QCLuceneDocumentPrivate> d;
86
87private:
88 mutable QList<QCLuceneField*> fieldList;
89};
90
91QT_END_NAMESPACE
92
93#endif // QDOCUMENT_P_H
Note: See TracBrowser for help on using the repository browser.