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


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

clucene.sourceforge.net