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
KeywordTokenizer.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 KEYWORDTOKENIZER_H
8
#define KEYWORDTOKENIZER_H
9
10
#include "
Tokenizer.h
"
11
12
namespace
Lucene
13
{
15
class
LPPAPI
KeywordTokenizer
:
public
Tokenizer
16
{
17
public
:
18
KeywordTokenizer
(
ReaderPtr
input);
19
KeywordTokenizer
(
ReaderPtr
input, int32_t bufferSize);
20
KeywordTokenizer
(
AttributeSourcePtr
source,
ReaderPtr
input, int32_t bufferSize);
21
KeywordTokenizer
(
AttributeFactoryPtr
factory,
ReaderPtr
input, int32_t bufferSize);
22
23
virtual
~
KeywordTokenizer
();
24
25
LUCENE_CLASS
(
KeywordTokenizer
);
26
27
protected
:
28
static
const
int32_t DEFAULT_BUFFER_SIZE;
29
30
bool
done
;
31
int32_t
finalOffset
;
32
TermAttributePtr
termAtt
;
33
OffsetAttributePtr
offsetAtt
;
34
35
protected
:
36
void
init(int32_t bufferSize);
37
38
public
:
39
virtual
bool
incrementToken();
40
virtual
void
end();
41
virtual
void
reset();
42
};
43
}
44
45
#endif
clucene.sourceforge.net