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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
IndexInput.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 INDEXINPUT_H
8 #define INDEXINPUT_H
9 
10 #include "LuceneObject.h"
11 
12 namespace Lucene
13 {
17  class LPPAPI IndexInput : public LuceneObject
18  {
19  public:
20  IndexInput();
21  virtual ~IndexInput();
22 
24 
25  protected:
26  bool preUTF8Strings; // true if we are reading old (modified UTF8) string format
27 
28  public:
31  virtual uint8_t readByte() = 0;
32 
38  virtual void readBytes(uint8_t* b, int32_t offset, int32_t length) = 0;
39 
49  virtual void readBytes(uint8_t* b, int32_t offset, int32_t length, bool useBuffer);
50 
53  virtual int32_t readInt();
54 
58  virtual int32_t readVInt();
59 
62  virtual int64_t readLong();
63 
66  virtual int64_t readVLong();
67 
70  virtual void setModifiedUTF8StringsMode();
71 
74  virtual String readString();
75 
77  virtual String readModifiedUTF8String();
78 
84  virtual int32_t readChars(wchar_t* buffer, int32_t start, int32_t length);
85 
94  virtual void skipChars(int32_t length);
95 
97  virtual void close() = 0;
98 
101  virtual int64_t getFilePointer() = 0;
102 
105  virtual void seek(int64_t pos) = 0;
106 
108  virtual int64_t length() = 0;
109 
117  virtual LuceneObjectPtr clone(LuceneObjectPtr other = LuceneObjectPtr());
118 
120  virtual MapStringString readStringStringMap();
121  };
122 }
123 
124 #endif

clucene.sourceforge.net