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


TokenStream.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 TOKENSTREAM_H
8 #define TOKENSTREAM_H
9 
10 #include "AttributeSource.h"
11 
12 namespace Lucene {
13 
44 class LPPAPI TokenStream : public AttributeSource {
45 protected:
48 
51 
54 
55 public:
56  virtual ~TokenStream();
57 
59 
60 public:
78  virtual bool incrementToken() = 0;
79 
87  virtual void end();
88 
95  virtual void reset();
96 
98  virtual void close();
99 };
100 
101 }
102 
103 #endif
Lucene::TokenStream::TokenStream
TokenStream(const AttributeFactoryPtr &factory)
A TokenStream using the supplied AttributeFactory for creating new Attribute instances.
Lucene::TokenStream::TokenStream
TokenStream(const AttributeSourcePtr &input)
A TokenStream that uses the same attributes as the supplied one.
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene::TokenStream::incrementToken
virtual bool incrementToken()=0
Consumers (ie., IndexWriter) use this method to advance the stream to the next token....
Lucene::TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.
Definition: TokenStream.h:44
Lucene::TokenStream::~TokenStream
virtual ~TokenStream()
Lucene::AttributeSource
An AttributeSource contains a list of different Attributes, and methods to add and get them....
Definition: AttributeSource.h:43
Lucene::TokenStream::TokenStream
TokenStream()
A TokenStream using the default attribute factory.
Lucene::TokenStream::end
virtual void end()
This method is called by the consumer after the last token has been consumed, after incrementToken() ...
Lucene
Definition: AbstractAllTermDocs.h:12
AttributeSource.h
Lucene::AttributeSourcePtr
boost::shared_ptr< AttributeSource > AttributeSourcePtr
Definition: LuceneTypes.h:520
Lucene::TokenStream::close
virtual void close()
Releases resources associated with this stream.
Lucene::AttributeFactoryPtr
boost::shared_ptr< AttributeFactory > AttributeFactoryPtr
Definition: LuceneTypes.h:519

clucene.sourceforge.net