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

Loading...
Searching...
No Matches
CachingTokenFilter.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 CACHINGTOKENFILTER_H
8#define CACHINGTOKENFILTER_H
9
10#include "TokenFilter.h"
11
12 namespace Lucene {
13
19 class LPPAPI CachingTokenFilter : public TokenFilter {
20 public:
21 CachingTokenFilter(const TokenStreamPtr& input);
22 virtual ~CachingTokenFilter();
23
24 LUCENE_CLASS(CachingTokenFilter);
25
26 protected:
27 Collection<AttributeSourceStatePtr> cache;
28 Collection<AttributeSourceStatePtr>::iterator iterator;
29 AttributeSourceStatePtr finalState;
30
31 public:
32 virtual bool incrementToken();
33 virtual void end();
34 virtual void reset();
35
36 protected:
37 void fillCache();
38};
39
40}
41
42#endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
TokenFilter.h
Lucene::CachingTokenFilter::fillCache
void fillCache()
Lucene::CachingTokenFilter::~CachingTokenFilter
virtual ~CachingTokenFilter()
Lucene::CachingTokenFilter::reset
virtual void reset()
Reset the filter as well as the input TokenStream.
Lucene::CachingTokenFilter::end
virtual void end()
Performs end-of-stream operations, if any, and calls then end() on the input TokenStream....
Lucene::CachingTokenFilter::incrementToken
virtual bool incrementToken()
Consumers (ie., IndexWriter) use this method to advance the stream to the next token....
Lucene::CachingTokenFilter::cache
Collection< AttributeSourceStatePtr > cache
Definition CachingTokenFilter.h:27
Lucene::CachingTokenFilter::finalState
AttributeSourceStatePtr finalState
Definition CachingTokenFilter.h:29
Lucene::CachingTokenFilter::iterator
Collection< AttributeSourceStatePtr >::iterator iterator
Definition CachingTokenFilter.h:28
Lucene::CachingTokenFilter::CachingTokenFilter
CachingTokenFilter(const TokenStreamPtr &input)
Lucene::Collection
Utility template class to handle collections that can be safely copied and shared.
Definition Collection.h:17
Lucene::Collection::iterator
collection_type::iterator iterator
Definition Collection.h:22
Lucene::TokenFilter::TokenFilter
TokenFilter(const TokenStreamPtr &input)
Construct a token stream filtering the given input.
Lucene::TokenFilter::input
TokenStreamPtr input
The source of tokens for this filter.
Definition TokenFilter.h:30
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::TokenStreamPtr
boost::shared_ptr< TokenStream > TokenStreamPtr
Definition LuceneTypes.h:63
Lucene::AttributeSourceStatePtr
boost::shared_ptr< AttributeSourceState > AttributeSourceStatePtr
Definition LuceneTypes.h:521

clucene.sourceforge.net