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

ByteSliceWriter.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 BYTESLICEWRITER_H
8 #define BYTESLICEWRITER_H
9
10 #include "LuceneObject.h"
11
12 namespace Lucene {
13
16 class ByteSliceWriter : public LuceneObject {
17 public:
18 ByteSliceWriter(const ByteBlockPoolPtr& pool);
19 virtual ~ByteSliceWriter();
20
21 LUCENE_CLASS(ByteSliceWriter);
22
23 protected:
24 ByteArray slice;
25 int32_t upto;
26 ByteBlockPoolPtr pool;
27
28 public:
29 int32_t offset0;
30
31 public:
33 void init(int32_t address);
34
36 void writeByte(uint8_t b);
37
38 void writeBytes(const uint8_t* b, int32_t offset, int32_t length);
39 int32_t getAddress();
40 void writeVInt(int32_t i);
41 };
42
43 }
44
45 #endif
Lucene::ByteSliceWriter::offset0
int32_t offset0
Definition: ByteSliceWriter.h:29
Lucene::ByteSliceWriter::writeByte
void writeByte(uint8_t b)
Write byte into byte slice stream.
Lucene::ByteSliceWriter::init
void init(int32_t address)
Set up the writer to write at address.
Lucene::ByteBlockPoolPtr
boost::shared_ptr< ByteBlockPool > ByteBlockPoolPtr
Definition: LuceneTypes.h:89
LuceneObject.h
Lucene::ByteSliceWriter
Class to write byte streams into slices of shared byte[]. This is used by DocumentsWriter to hold the...
Definition: ByteSliceWriter.h:16
Lucene::ByteSliceWriter::slice
ByteArray slice
Definition: ByteSliceWriter.h:21
Lucene::LuceneObject
Base class for all Lucene classes.
Definition: LuceneObject.h:31
Lucene::ByteSliceWriter::getAddress
int32_t getAddress()
Lucene::ByteSliceWriter::~ByteSliceWriter
virtual ~ByteSliceWriter()
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::ByteSliceWriter::upto
int32_t upto
Definition: ByteSliceWriter.h:25
Lucene::ByteSliceWriter::pool
ByteBlockPoolPtr pool
Definition: ByteSliceWriter.h:26
Lucene::ByteSliceWriter::writeVInt
void writeVInt(int32_t i)
Lucene::ByteSliceWriter::writeBytes
void writeBytes(const uint8_t *b, int32_t offset, int32_t length)
Lucene::ByteSliceWriter::ByteSliceWriter
ByteSliceWriter(const ByteBlockPoolPtr &pool)

clucene.sourceforge.net