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

IndexInput.h
Go to the documentation of this file.
1 // 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 INDEXINPUT_H
8 #define INDEXINPUT_H
9
10 #include "LuceneObject.h"
11
12 namespace Lucene {
13
17 class LPPAPI IndexInput : public LuceneObject {
18 public:
19 IndexInput();
20 virtual ~IndexInput();
21
22 LUCENE_CLASS(IndexInput);
23
24 protected:
25 bool preUTF8Strings; // true if we are reading old (modified UTF8) string format
26
27 public:
30 virtual uint8_t readByte() = 0;
31
37 virtual void readBytes(uint8_t* b, int32_t offset, int32_t length) = 0;
38
48 virtual void readBytes(uint8_t* b, int32_t offset, int32_t length, bool useBuffer);
49
52 virtual int32_t readInt();
53
57 virtual int32_t readVInt();
58
61 virtual int64_t readLong();
62
65 virtual int64_t readVLong();
66
69 virtual void setModifiedUTF8StringsMode();
70
73 virtual String readString();
74
76 virtual String readModifiedUTF8String();
77
83 virtual int32_t readChars(wchar_t* buffer, int32_t start, int32_t length);
84
93 virtual void skipChars(int32_t length);
94
96 virtual void close() = 0;
97
100 virtual int64_t getFilePointer() = 0;
101
104 virtual void seek(int64_t pos) = 0;
105
107 virtual int64_t length() = 0;
108
116 virtual LuceneObjectPtr clone(const LuceneObjectPtr& other = LuceneObjectPtr());
117
119 virtual MapStringString readStringStringMap();
120 };
121
122 }
123
124 #endif
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
LuceneObject.h
Lucene::LuceneObject
Base class for all Lucene classes.
Definition: LuceneObject.h:31
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::IndexInput
Abstract base class for input from a file in a Directory. A random-access input stream. Used for all Lucene index input operations.
Definition: IndexInput.h:17

clucene.sourceforge.net