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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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 
12 namespace Lucene {
13 
16 class LPPAPI MappingCharFilter : public BaseCharFilter {
17 public:
19  MappingCharFilter(const NormalizeCharMapPtr& normMap, const CharStreamPtr& in);
20 
22  MappingCharFilter(const NormalizeCharMapPtr& normMap, const ReaderPtr& in);
23 
24  virtual ~MappingCharFilter();
25 
27 
28 protected:
29  NormalizeCharMapPtr normMap;
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);
43  NormalizeCharMapPtr match(const NormalizeCharMapPtr& map);
44 };
45 
46 }
47 
48 #endif

clucene.sourceforge.net