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
CharBlockPool.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 CHARBLOCKPOOL_H
8 #define CHARBLOCKPOOL_H
9
10 #include "LuceneObject.h"
11
12 namespace Lucene
13 {
14 class CharBlockPool : public LuceneObject
15 {
16 public:
17 CharBlockPool(DocumentsWriterPtr docWriter);
18 virtual ~CharBlockPool();
19
20 LUCENE_CLASS(CharBlockPool);
21
22 public:
23 Collection<CharArray> buffers;
24 int32_t numBuffer;
25 int32_t bufferUpto; // Which buffer we are up to
26 int32_t charUpto; // Where we are in head buffer
27
28 CharArray buffer; // Current head buffer
29 int32_t charOffset; // Current head offset
30
31 protected:
32 DocumentsWriterWeakPtr _docWriter;
33
34 public:
35 void reset();
36 void nextBuffer();
37 };
38 }
39
40 #endif

clucene.sourceforge.net