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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TermBuffer.h
Go to the documentation of this file.
1 
2 // Copyright (c) 2009-2014 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 public:
16  TermBuffer();
17  virtual ~TermBuffer();
18 
20 
21 protected:
22  String field;
23  TermPtr term; // cached
24  bool preUTF8Strings; // true if strings are stored in modified UTF8 encoding
25 
28 
29 public:
30  virtual int32_t compareTo(const LuceneObjectPtr& other);
31 
33  void setPreUTF8Strings();
34 
35  void read(const IndexInputPtr& input, const FieldInfosPtr& fieldInfos);
36 
37  void set(const TermPtr& term);
38  void set(const TermBufferPtr& other);
39  void reset();
40 
41  TermPtr toTerm();
42 
43  virtual LuceneObjectPtr clone(const LuceneObjectPtr& other = LuceneObjectPtr());
44 
45 protected:
46  int32_t compareChars(wchar_t* chars1, int32_t len1, wchar_t* chars2, int32_t len2);
47 };
48 
49 }
50 
51 #endif

clucene.sourceforge.net