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


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

clucene.sourceforge.net