PostlistCursor Class Reference

Inheritance diagram for PostlistCursor:

Inheritance graph
[legend]
Collaboration diagram for PostlistCursor:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PostlistCursor (Btree *in, Xapian::docid offset_)
bool next ()
 Advance to the next key.
 PostlistCursor (FlintTable *in, Xapian::docid offset_)
 ~PostlistCursor ()
bool next ()
 Advance to the next key.

Public Attributes

string key
string tag
Xapian::docid firstdid
Xapian::termcount tf
Xapian::termcount cf

Private Attributes

Xapian::docid offset

Detailed Description

Definition at line 69 of file quartzcompact.cc.


Constructor & Destructor Documentation

PostlistCursor::PostlistCursor ( Btree in,
Xapian::docid  offset_ 
) [inline]

Definition at line 76 of file quartzcompact.cc.

References FlintCursor::find_entry(), and next().

PostlistCursor::PostlistCursor ( FlintTable in,
Xapian::docid  offset_ 
) [inline]

Definition at line 90 of file xapian-compact.cc.

References FlintCursor::find_entry(), and next().

PostlistCursor::~PostlistCursor (  )  [inline]

Definition at line 97 of file xapian-compact.cc.

References FlintCursor::get_table().


Member Function Documentation

bool PostlistCursor::next (  )  [inline]

Advance to the next key.

If cursor is unpositioned, the result is simply false.

If cursor is positioned, and points to the very last item in the Btree the cursor is made unpositioned, and the result is false. Otherwise the cursor is moved to the next item in the B-tree, and the result is true.

Effectively, FlintCursor::next() loses the position of BC when it drops off the end of the list of items. If this is awkward, one can always arrange for a key to be present which has a rightmost position in a set of keys,

Reimplemented from FlintCursor.

Definition at line 83 of file quartzcompact.cc.

References cf, FlintCursor::current_key, FlintCursor::current_tag, firstdid, key, Bcursor::next(), offset, Bcursor::read_tag(), tag, tf, unpack_string_preserving_sort(), unpack_uint(), and unpack_uint_preserving_sort().

Referenced by main(), merge_postlists(), and PostlistCursor().

bool PostlistCursor::next (  )  [inline]

Advance to the next key.

If cursor is unpositioned, the result is simply false.

If cursor is positioned, and points to the very last item in the Btree the cursor is made unpositioned, and the result is false. Otherwise the cursor is moved to the next item in the B-tree, and the result is true.

Effectively, FlintCursor::next() loses the position of BC when it drops off the end of the list of items. If this is awkward, one can always arrange for a key to be present which has a rightmost position in a set of keys,

Reimplemented from FlintCursor.

Definition at line 102 of file xapian-compact.cc.

References cf, FlintCursor::current_key, FlintCursor::current_tag, firstdid, is_metainfo_key(), is_user_metadata_key(), key, FlintCursor::next(), offset, Bcursor::read_tag(), tag, tf, unpack_string_preserving_sort(), unpack_uint(), and unpack_uint_preserving_sort().


Member Data Documentation

Xapian::docid PostlistCursor::offset [private]

Definition at line 70 of file quartzcompact.cc.

Referenced by next().

string PostlistCursor::key

Definition at line 72 of file quartzcompact.cc.

Referenced by main(), merge_postlists(), next(), PostlistCursorGt::operator()(), and CursorGt::operator()().

string PostlistCursor::tag

Definition at line 72 of file quartzcompact.cc.

Referenced by main(), merge_postlists(), and next().

Xapian::docid PostlistCursor::firstdid

Definition at line 73 of file quartzcompact.cc.

Referenced by main(), merge_postlists(), next(), PostlistCursorGt::operator()(), and CursorGt::operator()().

Xapian::termcount PostlistCursor::tf

Definition at line 74 of file quartzcompact.cc.

Referenced by main(), merge_postlists(), and next().

Xapian::termcount PostlistCursor::cf

Definition at line 74 of file quartzcompact.cc.

Referenced by main(), merge_postlists(), and next().


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.