author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Mon, 15 Mar 2010 12:43:09 +0200 | |
branch | RCL_3 |
changeset 6 | dee5afe5301f |
parent 4 | 3b1da2848fc7 |
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 QFIELD_P_H |
|
19 |
#define QFIELD_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(document) |
|
39 |
class Field; |
|
40 |
CL_NS_END |
|
41 |
CL_NS_USE(document) |
|
42 |
||
43 |
QT_BEGIN_NAMESPACE |
|
44 |
||
45 |
class QCLuceneReader; |
|
46 |
class QCLuceneDocument; |
|
47 |
||
48 |
class QHELP_EXPORT QCLuceneFieldPrivate : public QSharedData |
|
49 |
{ |
|
50 |
public: |
|
51 |
QCLuceneFieldPrivate(); |
|
52 |
QCLuceneFieldPrivate(const QCLuceneFieldPrivate &other); |
|
53 |
||
54 |
~QCLuceneFieldPrivate(); |
|
55 |
||
56 |
Field *field; |
|
57 |
bool deleteCLuceneField; |
|
58 |
||
59 |
private: |
|
60 |
QCLuceneFieldPrivate &operator=(const QCLuceneFieldPrivate &other); |
|
61 |
}; |
|
62 |
||
63 |
class QHELP_EXPORT QCLuceneField |
|
64 |
{ |
|
65 |
public: |
|
66 |
enum Store { |
|
67 |
STORE_YES = 1, |
|
68 |
STORE_NO = 2, |
|
69 |
STORE_COMPRESS = 4 |
|
70 |
}; |
|
71 |
||
72 |
enum Index { |
|
73 |
INDEX_NO = 16, |
|
74 |
INDEX_TOKENIZED = 32, |
|
75 |
INDEX_UNTOKENIZED = 64, |
|
76 |
INDEX_NONORMS = 128 |
|
77 |
}; |
|
78 |
||
79 |
enum TermVector { |
|
80 |
TERMVECTOR_NO = 256, |
|
81 |
TERMVECTOR_YES = 512, |
|
82 |
TERMVECTOR_WITH_POSITIONS = 1024, |
|
83 |
TERMVECTOR_WITH_OFFSETS = 2048 |
|
84 |
}; |
|
85 |
||
86 |
QCLuceneField(const QString &name, const QString &value, int configs); |
|
87 |
QCLuceneField(const QString &name, QCLuceneReader *reader, int configs); |
|
88 |
~QCLuceneField(); |
|
89 |
||
90 |
QString name() const; |
|
91 |
QString stringValue() const; |
|
92 |
QCLuceneReader* readerValue() const; |
|
93 |
bool isStored() const; |
|
94 |
bool isIndexed() const; |
|
95 |
bool isTokenized() const; |
|
96 |
bool isCompressed() const; |
|
97 |
void setConfig(int termVector); |
|
98 |
bool isTermVectorStored() const; |
|
99 |
bool isStoreOffsetWithTermVector() const; |
|
100 |
bool isStorePositionWithTermVector() const; |
|
101 |
qreal getBoost() const; |
|
102 |
void setBoost(qreal value); |
|
103 |
bool isBinary() const; |
|
104 |
bool getOmitNorms() const; |
|
105 |
void setOmitNorms(bool omitNorms); |
|
106 |
QString toString() const; |
|
107 |
||
108 |
protected: |
|
109 |
QCLuceneField(); |
|
110 |
friend class QCLuceneDocument; |
|
111 |
QSharedDataPointer<QCLuceneFieldPrivate> d; |
|
112 |
||
113 |
private: |
|
114 |
QCLuceneReader* reader; |
|
115 |
}; |
|
116 |
||
117 |
QT_END_NAMESPACE |
|
118 |
||
119 |
#endif // QFIELD_P_H |