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
include
FastCharStream.h
Go to the documentation of this file.
1
2
// 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 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
public
:
21
FastCharStream
(
const
ReaderPtr
& reader);
22
virtual
~
FastCharStream
();
23
24
LUCENE_CLASS
(
FastCharStream
);
25
26
public
:
27
CharArray buffer;
28
29
int32_t
bufferLength
;
// end of valid chars
30
int32_t
bufferPosition
;
// next char to read
31
32
int32_t
tokenStart
;
// offset in buffer
33
int32_t
bufferStart
;
// position in file of buffer
34
35
ReaderPtr
input
;
// source of chars
36
37
public
:
38
virtual
wchar_t
readChar();
39
virtual
wchar_t
BeginToken();
40
virtual
void
backup(int32_t amount);
41
virtual
String GetImage();
42
virtual
CharArray GetSuffix(int32_t length);
43
virtual
void
Done();
44
virtual
int32_t getColumn();
45
virtual
int32_t getLine();
46
virtual
int32_t getEndColumn();
47
virtual
int32_t getEndLine();
48
virtual
int32_t getBeginColumn();
49
virtual
int32_t getBeginLine();
50
51
protected
:
52
void
refill();
53
};
54
55
}
56
57
#endif
clucene.sourceforge.net