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
FastCharStream.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 FASTCHARSTREAM_H
8 #define FASTCHARSTREAM_H
9
10 #include "QueryParserCharStream.h"
11
12 namespace Lucene
13 {
18 class LPPAPI FastCharStream : public QueryParserCharStream, public LuceneObject
19 {
20 public:
22 FastCharStream(ReaderPtr reader);
23 virtual ~FastCharStream();
24
25 LUCENE_CLASS(FastCharStream);
26
27 public:
28 CharArray buffer;
29
30 int32_t bufferLength; // end of valid chars
31 int32_t bufferPosition; // next char to read
32
33 int32_t tokenStart; // offset in buffer
34 int32_t bufferStart; // position in file of buffer
35
36 ReaderPtr input; // source of chars
37
38 public:
39 virtual wchar_t readChar();
40 virtual wchar_t BeginToken();
41 virtual void backup(int32_t amount);
42 virtual String GetImage();
43 virtual CharArray GetSuffix(int32_t length);
44 virtual void Done();
45 virtual int32_t getColumn();
46 virtual int32_t getLine();
47 virtual int32_t getEndColumn();
48 virtual int32_t getEndLine();
49 virtual int32_t getBeginColumn();
50 virtual int32_t getBeginLine();
51
52 protected:
53 void refill();
54 };
55 }
56
57 #endif

clucene.sourceforge.net