FlintAllDocsPostList Class Reference

#include <flint_alldocspostlist.h>

Inheritance diagram for FlintAllDocsPostList:

Inheritance graph
[legend]
Collaboration diagram for FlintAllDocsPostList:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FlintAllDocsPostList (Xapian::Internal::RefCntPtr< const FlintDatabase > db_, Xapian::doccount doccount_)
 ~FlintAllDocsPostList ()
Xapian::doccount get_termfreq () const
 Return the exact term frequency.
Xapian::docid get_docid () const
 Return the current docid.
Xapian::doclength get_doclength () const
 Return the length of current document.
Xapian::termcount get_wdf () const
 Return the wdf for the document at the current position.
PostListnext (Xapian::weight w_min)
 Advance the current position to the next document in the postlist.
PostListskip_to (Xapian::docid desired_did, Xapian::weight w_min)
 Skip forward to the specified docid.
bool at_end () const
 Return true if the current position is past the last entry in this list.
std::string get_description () const
 Return a string description of this object.

Private Member Functions

void operator= (const FlintAllDocsPostList &)
 Don't allow assignment.
 FlintAllDocsPostList (const FlintAllDocsPostList &)
 Don't allow copying.
PostListread_did_from_current_key ()
 Set current_did from cursor->current_key.

Private Attributes

Xapian::Internal::RefCntPtr<
const FlintDatabase
db
 The database we're iterating over.
Xapian::doccount doccount
 The number of documents in the database.
AutoPtr< FlintCursorcursor
 Cursor running over termlist table keys.
Xapian::docid current_did
 The current document id.

Detailed Description

Definition at line 28 of file flint_alldocspostlist.h.


Constructor & Destructor Documentation

FlintAllDocsPostList::FlintAllDocsPostList ( const FlintAllDocsPostList  )  [private]

Don't allow copying.

FlintAllDocsPostList::FlintAllDocsPostList ( Xapian::Internal::RefCntPtr< const FlintDatabase db_,
Xapian::doccount  doccount_ 
) [inline]

Definition at line 51 of file flint_alldocspostlist.h.

References cursor.

FlintAllDocsPostList::~FlintAllDocsPostList (  ) 

Definition at line 32 of file flint_alldocspostlist.cc.


Member Function Documentation

void FlintAllDocsPostList::operator= ( const FlintAllDocsPostList  )  [private]

Don't allow assignment.

PostList * FlintAllDocsPostList::read_did_from_current_key (  )  [private]

Set current_did from cursor->current_key.

Definition at line 84 of file flint_alldocspostlist.cc.

References current_did, cursor, DEBUGCALL, RETURN, and unpack_uint_preserving_sort().

Referenced by next(), and skip_to().

Xapian::doccount FlintAllDocsPostList::get_termfreq (  )  const [virtual]

Return the exact term frequency.

Leaf postlists have an exact termfreq, which get_termfreq_min(), get_termfreq_max(), and get_termfreq_est() all report.

Implements LeafPostList.

Definition at line 37 of file flint_alldocspostlist.cc.

References doccount.

Xapian::docid FlintAllDocsPostList::get_docid (  )  const [virtual]

Return the current docid.

Implements Xapian::PostingIterator::Internal.

Definition at line 43 of file flint_alldocspostlist.cc.

References current_did.

Xapian::doclength FlintAllDocsPostList::get_doclength (  )  const [virtual]

Return the length of current document.

Implements Xapian::PostingIterator::Internal.

Definition at line 49 of file flint_alldocspostlist.cc.

References Assert, current_did, cursor, DEBUGCALL, RETURN, and unpack_uint().

Xapian::termcount FlintAllDocsPostList::get_wdf (  )  const [virtual]

Return the wdf for the document at the current position.

The default implementation throws Xapian::UnimplementedError.

Reimplemented from Xapian::PostingIterator::Internal.

Definition at line 76 of file flint_alldocspostlist.cc.

References Assert, current_did, DEBUGCALL, and RETURN.

PostList * FlintAllDocsPostList::next ( Xapian::weight  w_min  )  [virtual]

Advance the current position to the next document in the postlist.

The list starts before the first entry in the list, so next() must be called before any methods which need the context of the current position.

Parameters:
w_min The minimum weight contribution that is needed (this is just a hint which PostList subclasses may ignore).
Returns:
If a non-NULL pointer is returned, then the caller should substitute the returned pointer for its pointer to us, and then delete us. This "pruning" can only happen for a non-leaf subclass of this class.

Implements Xapian::PostingIterator::Internal.

Definition at line 106 of file flint_alldocspostlist.cc.

References Assert, at_end(), cursor, DEBUGCALL, read_did_from_current_key(), and RETURN.

PostList * FlintAllDocsPostList::skip_to ( Xapian::docid  ,
Xapian::weight  w_min 
) [virtual]

Skip forward to the specified docid.

If the specified docid isn't in the list, position ourselves on the first document after it (or at_end() if no greater docids are present).

Parameters:
w_min The minimum weight contribution that is needed (this is just a hint which PostList subclasses may ignore).
Returns:
If a non-NULL pointer is returned, then the caller should substitute the returned pointer for its pointer to us, and then delete us. This "pruning" can only happen for a non-leaf subclass of this class.

Implements Xapian::PostingIterator::Internal.

Definition at line 115 of file flint_alldocspostlist.cc.

References at_end(), current_did, cursor, DEBUGCALL, pack_uint_preserving_sort(), read_did_from_current_key(), and RETURN.

bool FlintAllDocsPostList::at_end (  )  const [virtual]

Return true if the current position is past the last entry in this list.

Implements Xapian::PostingIterator::Internal.

Definition at line 133 of file flint_alldocspostlist.cc.

References cursor, DEBUGCALL, and RETURN.

Referenced by next(), and skip_to().

string FlintAllDocsPostList::get_description (  )  const [virtual]

Return a string description of this object.

Implements Xapian::PostingIterator::Internal.

Definition at line 139 of file flint_alldocspostlist.cc.

References current_did, doccount, and om_tostring().


Member Data Documentation

Xapian::Internal::RefCntPtr<const FlintDatabase> FlintAllDocsPostList::db [private]

The database we're iterating over.

Definition at line 39 of file flint_alldocspostlist.h.

Xapian::doccount FlintAllDocsPostList::doccount [private]

The number of documents in the database.

Definition at line 42 of file flint_alldocspostlist.h.

Referenced by get_description(), and get_termfreq().

AutoPtr<FlintCursor> FlintAllDocsPostList::cursor [private]

Cursor running over termlist table keys.

Definition at line 45 of file flint_alldocspostlist.h.

Referenced by at_end(), FlintAllDocsPostList(), get_doclength(), next(), read_did_from_current_key(), and skip_to().

Xapian::docid FlintAllDocsPostList::current_did [private]

The current document id.

Definition at line 48 of file flint_alldocspostlist.h.

Referenced by get_description(), get_docid(), get_doclength(), get_wdf(), read_did_from_current_key(), and skip_to().


The documentation for this class was generated from the following files:
Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.