Lucene++ - a full-featured, c++ search engine
API Documentation

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TermBuffer.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2011 Alan Wright. All rights reserved.
3 // Distributable under the terms of either the Apache License (Version 2.0)
4 // or the GNU Lesser General Public License.
6
7 #ifndef TERMBUFFER_H
8 #define TERMBUFFER_H
9
10 #include "LuceneObject.h"
11
12 namespace Lucene
13 {
14 class TermBuffer : public LuceneObject
15 {
16 public:
17 TermBuffer();
18 virtual ~TermBuffer();
19
20 LUCENE_CLASS(TermBuffer);
21
22 protected:
23 String field;
24 TermPtr term; // cached
25 bool preUTF8Strings; // true if strings are stored in modified UTF8 encoding
26
27 UnicodeResultPtr text;
28 UTF8ResultPtr bytes;
29
30 public:
31 virtual int32_t compareTo(LuceneObjectPtr other);
32
34 void setPreUTF8Strings();
35
36 void read(IndexInputPtr input, FieldInfosPtr fieldInfos);
37
38 void set(TermPtr term);
39 void set(TermBufferPtr other);
40 void reset();
41
42 TermPtr toTerm();
43
44 virtual LuceneObjectPtr clone(LuceneObjectPtr other = LuceneObjectPtr());
45
46 protected:
47 int32_t compareChars(wchar_t* chars1, int32_t len1, wchar_t* chars2, int32_t len2);
48 };
49 }
50
51 #endif

clucene.sourceforge.net