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


MappingCharFilter.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 MAPPINGCHARFILTER_H
8 #define MAPPINGCHARFILTER_H
9 
10 #include "BaseCharFilter.h"
11 
12 namespace Lucene {
13 
16 class LPPAPI MappingCharFilter : public BaseCharFilter {
17 public:
20 
22  MappingCharFilter(const NormalizeCharMapPtr& normMap, const ReaderPtr& in);
23 
24  virtual ~MappingCharFilter();
25 
27 
28 protected:
31  String replacement;
32  int32_t charPointer;
33  int32_t nextCharCounter;
34 
35 public:
36  virtual int32_t read();
37  virtual int32_t read(wchar_t* buffer, int32_t offset, int32_t length);
38 
39 protected:
40  int32_t nextChar();
41  void pushChar(int32_t c);
42  void pushLastChar(int32_t c);
44 };
45 
46 }
47 
48 #endif
Lucene::MappingCharFilter::pushLastChar
void pushLastChar(int32_t c)
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene::Collection< wchar_t >
Lucene::MappingCharFilter::buffer
Collection< wchar_t > buffer
Definition: MappingCharFilter.h:30
Lucene::MappingCharFilter::nextCharCounter
int32_t nextCharCounter
Definition: MappingCharFilter.h:33
Lucene::ReaderPtr
boost::shared_ptr< Reader > ReaderPtr
Definition: LuceneTypes.h:547
Lucene::CharStreamPtr
boost::shared_ptr< CharStream > CharStreamPtr
Definition: LuceneTypes.h:27
Lucene::MappingCharFilter
Simplistic CharFilter that applies the mappings contained in a NormalizeCharMap to the character stre...
Definition: MappingCharFilter.h:16
Lucene::MappingCharFilter::read
virtual int32_t read()
Read a single character.
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::MappingCharFilter::match
NormalizeCharMapPtr match(const NormalizeCharMapPtr &map)
Lucene::MappingCharFilter::~MappingCharFilter
virtual ~MappingCharFilter()
Lucene::MappingCharFilter::MappingCharFilter
MappingCharFilter(const NormalizeCharMapPtr &normMap, const CharStreamPtr &in)
Default constructor that takes a CharStream.
Lucene::MappingCharFilter::nextChar
int32_t nextChar()
Lucene::MappingCharFilter::read
virtual int32_t read(wchar_t *buffer, int32_t offset, int32_t length)
Read characters into a portion of an array.
Lucene::MappingCharFilter::charPointer
int32_t charPointer
Definition: MappingCharFilter.h:32
Lucene::MappingCharFilter::pushChar
void pushChar(int32_t c)
Lucene::MappingCharFilter::normMap
NormalizeCharMapPtr normMap
Definition: MappingCharFilter.h:26
Lucene::MappingCharFilter::replacement
String replacement
Definition: MappingCharFilter.h:31
BaseCharFilter.h
Lucene::MappingCharFilter::MappingCharFilter
MappingCharFilter(const NormalizeCharMapPtr &normMap, const ReaderPtr &in)
Easy-use constructor that takes a Reader.
Lucene::NormalizeCharMapPtr
boost::shared_ptr< NormalizeCharMap > NormalizeCharMapPtr
Definition: LuceneTypes.h:38

clucene.sourceforge.net