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

Loading...
Searching...
No Matches
CharFilter.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 CHARFILTER_H
8#define CHARFILTER_H
9
10#include "CharStream.h"
11
12 namespace Lucene {
13
17 class LPPAPI CharFilter : public CharStream {
18 protected:
19 CharFilter(const CharStreamPtr& in);
20 public:
21 virtual ~CharFilter();
22
23 LUCENE_CLASS(CharFilter);
24
25 protected:
26 CharStreamPtr input;
27
28 protected:
32 virtual int32_t correct(int32_t currentOff);
33
35 virtual int32_t correctOffset(int32_t currentOff);
36
37 virtual void close();
38 virtual int32_t read(wchar_t* buffer, int32_t offset, int32_t length);
39 virtual bool markSupported();
40 virtual void mark(int32_t readAheadLimit);
41 virtual void reset();
42};
43
44}
45
46#endif
CharStream.h
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Lucene::CharFilter
Subclasses of CharFilter can be chained to filter CharStream. They can be used as Reader with additio...
Definition CharFilter.h:17
Lucene::CharFilter::input
CharStreamPtr input
Definition CharFilter.h:26
Lucene::CharFilter::reset
virtual void reset()
Reset the stream. If the stream has been marked, then attempt to reposition it at the mark....
Lucene::CharFilter::~CharFilter
virtual ~CharFilter()
Lucene::CharFilter::correctOffset
virtual int32_t correctOffset(int32_t currentOff)
Chains the corrected offset through the input CharFilter.
Lucene::CharFilter::close
virtual void close()
Close the stream.
Lucene::CharFilter::CharFilter
CharFilter(const CharStreamPtr &in)
Lucene::CharFilter::correct
virtual int32_t correct(int32_t currentOff)
Subclass may want to override to correct the current offset.
Lucene::CharFilter::markSupported
virtual bool markSupported()
Tell whether this stream supports the mark() operation.
Lucene::CharFilter::mark
virtual void mark(int32_t readAheadLimit)
Mark the present position in the stream. Subsequent calls to reset() will attempt to reposition the s...
Lucene::CharFilter::read
virtual int32_t read(wchar_t *buffer, int32_t offset, int32_t length)
Read characters into a portion of an array.
Lucene::CharStream
CharStream adds correctOffset functionality over Reader. All Tokenizers accept a CharStream instead o...
Definition CharStream.h:18
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::CharStreamPtr
boost::shared_ptr< CharStream > CharStreamPtr
Definition LuceneTypes.h:27

clucene.sourceforge.net