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


lucene::search::AbstractCachingFilter Class Reference

Wraps another filter's result and caches it. More...

#include <CachingWrapperFilter.h>

Inheritance diagram for lucene::search::AbstractCachingFilter:

lucene::search::Filter lucene::search::CachingWrapperFilter

Public Member Functions

virtual ~AbstractCachingFilter ()
lucene::util::BitSet * bits (lucene::index::IndexReader *reader)
 Returns a BitSet with true for documents which should be permitted in search results, and false for those that should not.
virtual Filter * clone () const =0
virtual TCHAR * toString ()=0
bool shouldDeleteBitSet (const lucene::util::BitSet *bits) const
 Because of the problem of cached bitsets with the CachingWrapperFilter, CLucene has no way of knowing whether to delete the bitset returned from bits().

Protected Member Functions

 AbstractCachingFilter (const AbstractCachingFilter &copy)
virtual lucene::util::BitSet * doBits (lucene::index::IndexReader *reader)=0
virtual bool doShouldDeleteBitSet (lucene::util::BitSet *bits)
 AbstractCachingFilter ()

Detailed Description

Wraps another filter's result and caches it.

The purpose is to allow filters to implement this and allow itself to be cached. Alternatively, use the CachingWrapperFilter to cache the filter.


Constructor & Destructor Documentation

lucene::search::AbstractCachingFilter::AbstractCachingFilter ( const AbstractCachingFilter &  copy  )  [protected]

lucene::search::AbstractCachingFilter::AbstractCachingFilter (  )  [protected]

virtual lucene::search::AbstractCachingFilter::~AbstractCachingFilter (  )  [virtual]


Member Function Documentation

virtual lucene:: util ::BitSet* lucene::search::AbstractCachingFilter::doBits ( lucene::index::IndexReader *  reader  )  [protected, pure virtual]

virtual bool lucene::search::AbstractCachingFilter::doShouldDeleteBitSet ( lucene::util::BitSet *  bits  )  [inline, protected, virtual]

lucene:: util ::BitSet* lucene::search::AbstractCachingFilter::bits ( lucene::index::IndexReader *  reader  )  [virtual]

Returns a BitSet with true for documents which should be permitted in search results, and false for those that should not.

Implements lucene::search::Filter.

virtual Filter* lucene::search::AbstractCachingFilter::clone (  )  const [pure virtual]

virtual TCHAR* lucene::search::AbstractCachingFilter::toString (  )  [pure virtual]

bool lucene::search::AbstractCachingFilter::shouldDeleteBitSet ( const lucene::util::BitSet *  bs  )  const [inline, virtual]

Because of the problem of cached bitsets with the CachingWrapperFilter, CLucene has no way of knowing whether to delete the bitset returned from bits().

To properly clean memory from bits(), pass the bitset to this function. The Filter should be deleted if this function returns true.

Reimplemented from lucene::search::Filter.


The documentation for this class was generated from the following file:

clucene.sourceforge.net