Lucene++ - a full-featured, c++ search engine
API Documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
include
lucene++
CharReader.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 CHARREADER_H
8
#define CHARREADER_H
9
10
#include "
CharStream.h
"
11
12
namespace
Lucene
{
13
16
class
LPPAPI
CharReader
:
public
CharStream
{
17
public
:
18
CharReader
(
const
ReaderPtr
& in);
19
virtual
~CharReader
();
20
21
LUCENE_CLASS
(
CharReader
);
22
23
protected
:
24
ReaderPtr
input
;
25
26
public
:
27
using
CharStream::read
;
28
29
static
CharStreamPtr
get
(
const
ReaderPtr
&
input
);
30
31
virtual
int32_t
correctOffset
(int32_t currentOff);
32
virtual
void
close
();
33
virtual
int32_t
read
(
wchar_t
* buffer, int32_t offset, int32_t
length
);
34
virtual
bool
markSupported
();
35
virtual
void
mark
(int32_t readAheadLimit);
36
virtual
void
reset
();
37
};
38
39
}
40
41
#endif
CharStream.h
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition
LuceneObject.h:24
Lucene::CharReader::~CharReader
virtual ~CharReader()
Lucene::CharReader::correctOffset
virtual int32_t correctOffset(int32_t currentOff)
Called by CharFilter(s) and Tokenizer to correct token offset.
Lucene::CharReader::reset
virtual void reset()
Reset the stream. If the stream has been marked, then attempt to reposition it at the mark....
Lucene::CharReader::markSupported
virtual bool markSupported()
Tell whether this stream supports the mark() operation.
Lucene::CharReader::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::CharReader::get
static CharStreamPtr get(const ReaderPtr &input)
Lucene::CharReader::CharReader
CharReader(const ReaderPtr &in)
Lucene::CharReader::read
virtual int32_t read(wchar_t *buffer, int32_t offset, int32_t length)
Read characters into a portion of an array.
Lucene::CharReader::input
ReaderPtr input
Definition
CharReader.h:24
Lucene::CharReader::close
virtual void close()
Close the stream.
Lucene::CharStream
CharStream adds correctOffset functionality over Reader. All Tokenizers accept a CharStream instead o...
Definition
CharStream.h:18
Lucene::Reader::read
virtual int32_t read()
Read a single character.
Lucene::Reader::length
virtual int64_t length()
The number of bytes in the stream.
Lucene
Definition
AbstractAllTermDocs.h:12
Lucene::CharStreamPtr
boost::shared_ptr< CharStream > CharStreamPtr
Definition
LuceneTypes.h:27
Lucene::ReaderPtr
boost::shared_ptr< Reader > ReaderPtr
Definition
LuceneTypes.h:547
clucene.sourceforge.net