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
IndexOutput.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 INDEXOUTPUT_H
8 #define INDEXOUTPUT_H
9
10 #include "LuceneObject.h"
11
12 namespace Lucene
13 {
18 class LPPAPI IndexOutput : public LuceneObject
19 {
20 public:
21 virtual ~IndexOutput();
22
23 LUCENE_CLASS(IndexOutput);
24
25 protected:
26 static const int32_t COPY_BUFFER_SIZE;
27 ByteArray copyBuffer;
28
29 public:
32 virtual void writeByte(uint8_t b) = 0;
33
38 virtual void writeBytes(const uint8_t* b, int32_t offset, int32_t length) = 0;
39
41 virtual void flush() = 0;
42
44 virtual void close() = 0;
45
47 virtual int64_t getFilePointer() = 0;
48
51 virtual void seek(int64_t pos) = 0;
52
54 virtual int64_t length() = 0;
55
56 public:
61 void writeBytes(const uint8_t* b, int32_t length);
62
65 void writeInt(int32_t i);
66
70 void writeVInt(int32_t i);
71
74 void writeLong(int64_t i);
75
79 void writeVLong(int64_t i);
80
83 void writeString(const String& s);
84
90 void writeChars(const String& s, int32_t start, int32_t length);
91
93 void copyBytes(IndexInputPtr input, int64_t numBytes);
94
100 void setLength(int64_t length);
101
104 void writeStringStringMap(MapStringString map);
105 };
106 }
107
108 #endif

clucene.sourceforge.net