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

Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
Lucene::SingleTermEnum Class Reference

Subclass of FilteredTermEnum for enumerating a single term. More...

`#include <SingleTermEnum.h>`

Inheritance diagram for Lucene::SingleTermEnum:

## Public Member Functions

| SingleTermEnum (const IndexReaderPtr &reader, const TermPtr &singleTerm)
virtual | ~SingleTermEnum ()
virtual String | getClassName ()
boost::shared_ptr< SingleTermEnum > | shared_from_this ()
virtual double | difference ()
| Equality measure on the term. More...
Public Member Functions inherited from Lucene::FilteredTermEnum
virtual | ~FilteredTermEnum ()
boost::shared_ptr< FilteredTermEnum > | shared_from_this ()
virtual int32_t | docFreq ()
| Returns the docFreq of the current Term in the enumeration. Returns -1 if no Term matches or all terms have been enumerated. More...
virtual bool | next ()
| Increments the enumeration to the next element. True if one exists. More...
virtual TermPtr | term ()
| Returns the current Term in the enumeration. Returns null if no Term matches or all terms have been enumerated. More...
virtual void | close ()
| Closes the enumeration to further activity, freeing resources. More...
Public Member Functions inherited from Lucene::TermEnum
virtual | ~TermEnum ()
boost::shared_ptr< TermEnum > | shared_from_this ()
Public Member Functions inherited from Lucene::LuceneObject
virtual | ~LuceneObject ()
virtual void | initialize ()
| Called directly after instantiation to create objects that depend on this object being fully constructed. More...
virtual LuceneObjectPtr | clone (const LuceneObjectPtr &other=LuceneObjectPtr())
| Return clone of this object. More...
virtual int32_t | hashCode ()
| Return hash code for this object. More...
virtual bool | equals (const LuceneObjectPtr &other)
| Return whether two objects are equal. More...
virtual int32_t | compareTo (const LuceneObjectPtr &other)
| Compare two objects. More...
virtual String | toString ()
| Returns a string representation of the object. More...
Public Member Functions inherited from Lucene::LuceneSync
virtual | ~LuceneSync ()
virtual SynchronizePtr | getSync ()
| Return this object synchronize lock. More...
virtual LuceneSignalPtr | getSignal ()
| Return this object signal. More...
virtual void | lock (int32_t timeout=0)
| Lock this object using an optional timeout. More...
virtual void | unlock ()
| Unlock this object. More...
virtual bool | holdsLock ()
| Returns true if this object is currently locked by current thread. More...
virtual void | wait (int32_t timeout=0)
| Wait for signal using an optional timeout. More...
virtual void | notifyAll ()
| Notify all threads waiting for signal. More...

## Static Public Member Functions

static String | _getClassName ()
Static Public Member Functions inherited from Lucene::FilteredTermEnum
static String | _getClassName ()
Static Public Member Functions inherited from Lucene::TermEnum
static String | _getClassName ()

## Protected Member Functions

virtual bool | endEnum ()
| Indicates the end of the enumeration has been reached. More...
virtual bool | termCompare (const TermPtr &term)
| Equality compare on the term. More...
Protected Member Functions inherited from Lucene::FilteredTermEnum
virtual void | setEnum (const TermEnumPtr &actualEnum)
| Use this method to set the actual TermEnum (eg. in ctor), it will be automatically positioned on the first matching term. More...
Protected Member Functions inherited from Lucene::LuceneObject
| LuceneObject ()

## Protected Attributes

TermPtr | singleTerm
bool | _endEnum
Protected Attributes inherited from Lucene::FilteredTermEnum
TermPtr | currentTerm
| The current term. More...
TermEnumPtr | actualEnum
| The delegate enum - to set this member use setEnum. More...
Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr | objectLock
LuceneSignalPtr | objectSignal

## Detailed Description

Subclass of FilteredTermEnum for enumerating a single term.

This can be used by MultiTermQuerys that need only visit one term, but want to preserve MultiTermQuery semantics such as MultiTermQuery#rewriteMethod.

## Constructor & Destructor Documentation

## ◆ SingleTermEnum()

Lucene::SingleTermEnum::SingleTermEnum | ( | const IndexReaderPtr & | reader,
|  | const TermPtr & | singleTerm
| ) |  |

## ◆ ~SingleTermEnum()

virtual Lucene::SingleTermEnum::~SingleTermEnum | ( |  | ) |

virtual

## Member Function Documentation

## ◆ _getClassName()

static String Lucene::SingleTermEnum::_getClassName | ( |  | ) |

inline static

## ◆ difference()

virtual double Lucene::SingleTermEnum::difference | ( |  | ) |

virtual

Equality measure on the term.

Implements Lucene::FilteredTermEnum.

## ◆ endEnum()

virtual bool Lucene::SingleTermEnum::endEnum | ( |  | ) |

protected virtual

Indicates the end of the enumeration has been reached.

Implements Lucene::FilteredTermEnum.

## ◆ getClassName()

virtual String Lucene::SingleTermEnum::getClassName | ( |  | ) |

inline virtual

Reimplemented from Lucene::FilteredTermEnum.

## ◆ shared_from_this()

boost::shared_ptr< SingleTermEnum > Lucene::SingleTermEnum::shared_from_this | ( |  | ) |

inline

## ◆ termCompare()

virtual bool Lucene::SingleTermEnum::termCompare | ( | const TermPtr & | term | ) |

protected virtual

Equality compare on the term.

Implements Lucene::FilteredTermEnum.

## Field Documentation

## ◆ _endEnum

bool Lucene::SingleTermEnum::_endEnum

protected

## ◆ singleTerm

TermPtr Lucene::SingleTermEnum::singleTerm

protected

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

- SingleTermEnum.h

clucene.sourceforge.net