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

BaseCharFilter.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 BASECHARFILTER_H
8 #define BASECHARFILTER_H
9
10 #include "CharFilter.h"
11
12 namespace Lucene {
13
16 class LPPAPI BaseCharFilter : public CharFilter {
17 public:
18 BaseCharFilter(const CharStreamPtr& in);
19 virtual ~BaseCharFilter();
20
21 LUCENE_CLASS(BaseCharFilter);
22
23 protected:
24 IntArray offsets;
25 IntArray diffs;
26 int32_t size;
27
28 protected:
30 virtual int32_t correct(int32_t currentOff);
31
32 int32_t getLastCumulativeDiff();
33 void addOffCorrectMap(int32_t off, int32_t cumulativeDiff);
34 };
35
36 }
37
38 #endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene::BaseCharFilter::diffs
IntArray diffs
Definition: BaseCharFilter.h:25
Lucene::CharStreamPtr
boost::shared_ptr< CharStream > CharStreamPtr
Definition: LuceneTypes.h:27
CharFilter.h
Lucene::CharFilter
Subclasses of CharFilter can be chained to filter CharStream. They can be used as Reader with additio...
Definition: CharFilter.h:17
Lucene::BaseCharFilter
Base utility class for implementing a CharFilter. You subclass this, and then record mappings by call...
Definition: BaseCharFilter.h:16
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::BaseCharFilter::size
int32_t size
Definition: BaseCharFilter.h:26

clucene.sourceforge.net