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

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

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

`#include <HitQueueBase.h>`

Inheritance diagram for Lucene::PriorityQueueScoreDocs:

## Public Member Functions

| PriorityQueueScoreDocs (const HitQueueBasePtr &hitQueue, int32_t size)
virtual | ~PriorityQueueScoreDocs ()
virtual String | getClassName ()
boost::shared_ptr< PriorityQueueScoreDocs > | shared_from_this ()
Public Member Functions inherited from Lucene::PriorityQueue< ScoreDocPtr >
| PriorityQueue (int32_t maxSize)
virtual | ~PriorityQueue ()
virtual void | initialize ()
| Called directly after instantiation to create objects that depend on this object being fully constructed. More...
int32_t | maxSize ()
| Return maximum size of queue. More...
ScoreDocPtr | add (const ScoreDocPtr &type)
| Adds an Object to a PriorityQueue in log(size) time. If one tries to add more objects than maxSize from initialize an IndexOutOfBoundsException is thrown. More...
ScoreDocPtr | addOverflow (const ScoreDocPtr &type)

Adds an Object to a PriorityQueue in log(size) time. It returns the object (if any) that was dropped off the heap because it was full. This can be the given parameter (in case it is smaller than the full heap's minimum, and couldn't be added), or another object that was previously the smallest value in the heap and now has been replaced by a larger one, or null if the queue wasn't yet full with maxSize elements. More...

ScoreDocPtr | top ()
| Returns the least element of the PriorityQueue. More...
ScoreDocPtr | pop ()
| Removes and returns the least element of the PriorityQueue. More...
ScoreDocPtr | updateTop ()
| Should be called when the Object at top changes values. More...
int32_t | size () const
| Returns the number of elements currently stored in the PriorityQueue. More...
bool | empty () const
| Returns whether PriorityQueue is currently empty. More...
void | clear ()
| Removes all entries from the PriorityQueue. More...
Public Member Functions inherited from Lucene::LuceneObject
virtual | ~LuceneObject ()
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 ()

## Protected Member Functions

virtual bool | lessThan (const ScoreDocPtr &first, const ScoreDocPtr &second)
| Determines the ordering of objects in this priority queue. Subclasses must define this one method. More...
virtual ScoreDocPtr | getSentinelObject ()
| This method can be overridden by extending classes to return a sentinel object which will be used by initialize to fill the queue, so that the code which uses that queue can always assume it's full and only change the top without attempting to insert any new object. More...
Protected Member Functions inherited from Lucene::PriorityQueue< ScoreDocPtr >
void | upHeap ()
void | downHeap ()
Protected Member Functions inherited from Lucene::LuceneObject
| LuceneObject ()

## Protected Attributes

HitQueueBaseWeakPtr | _hitQueue
Protected Attributes inherited from Lucene::PriorityQueue< ScoreDocPtr >
heap_type | heap
int32_t | _size
int32_t | _maxSize
Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr | objectLock
LuceneSignalPtr | objectSignal

## Additional Inherited Members

Public Types inherited from Lucene::PriorityQueue< ScoreDocPtr >
typedef std::vector< ScoreDocPtr > | heap_type

## Constructor & Destructor Documentation

Lucene::PriorityQueueScoreDocs::PriorityQueueScoreDocs | ( | const HitQueueBasePtr & | hitQueue,
|  | int32_t | size
| ) |  |

virtual Lucene::PriorityQueueScoreDocs::~PriorityQueueScoreDocs | ( |  | ) |

virtual

## Member Function Documentation

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

inline static

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

inline virtual

virtual ScoreDocPtr Lucene::PriorityQueueScoreDocs::getSentinelObject | ( |  | ) |

protected virtual

This method can be overridden by extending classes to return a sentinel object which will be used by initialize to fill the queue, so that the code which uses that queue can always assume it's full and only change the top without attempting to insert any new object.

Those sentinel values should always compare worse than any non-sentinel value (ie., lessThan should always favour the non-sentinel values).

Reimplemented from Lucene::PriorityQueue< ScoreDocPtr >.

virtual bool Lucene::PriorityQueueScoreDocs::lessThan | ( | const ScoreDocPtr & | first,
|  | const ScoreDocPtr & | second
| ) |  |

protected virtual

Determines the ordering of objects in this priority queue. Subclasses must define this one method.

Reimplemented from Lucene::PriorityQueue< ScoreDocPtr >.

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

inline

## Field Documentation

HitQueueBaseWeakPtr Lucene::PriorityQueueScoreDocs::_hitQueue

protected

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

- HitQueueBase.h

clucene.sourceforge.net