Brass::PostlistChunkReader Class Reference

PostlistChunkReader is essentially an iterator wrapper around a postlist chunk. More...

Collaboration diagram for Brass::PostlistChunkReader:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PostlistChunkReader (Xapian::docid first_did, const string &data_)
 Initialise the postlist chunk reader.
Xapian::docid get_docid () const
Xapian::termcount get_wdf () const
bool is_at_end () const
void next ()
 Advance to the next entry.

Private Attributes

string data
const char * pos
const char * end
bool at_end
Xapian::docid did
Xapian::termcount wdf


Detailed Description

PostlistChunkReader is essentially an iterator wrapper around a postlist chunk.

It simply iterates through the entries in a postlist.

Definition at line 258 of file brass_postlist.cc.


Constructor & Destructor Documentation

Brass::PostlistChunkReader::PostlistChunkReader ( Xapian::docid  first_did,
const string &  data_ 
) [inline]

Initialise the postlist chunk reader.

Parameters:
first_did First document id in this chunk.
data The tag string with the header removed.

Definition at line 275 of file brass_postlist.cc.

References at_end, end, pos, read_wdf(), and wdf.


Member Function Documentation

Xapian::docid Brass::PostlistChunkReader::get_docid (  )  const [inline]

Xapian::termcount Brass::PostlistChunkReader::get_wdf (  )  const [inline]

bool Brass::PostlistChunkReader::is_at_end (  )  const [inline]

void PostlistChunkReader::next (  ) 

Advance to the next entry.

Set at_end if we run off the end.

Definition at line 300 of file brass_postlist.cc.

References at_end, did, end, pos, read_did_increase(), read_wdf(), and wdf.

Referenced by BrassPostListTable::merge_changes(), and BrassPostListTable::merge_doclen_changes().


Member Data Documentation

Definition at line 264 of file brass_postlist.cc.

Referenced by is_at_end(), next(), and PostlistChunkReader().

Definition at line 259 of file brass_postlist.cc.

Definition at line 266 of file brass_postlist.cc.

Referenced by get_docid(), and next().

const char* Brass::PostlistChunkReader::end [private]

Definition at line 262 of file brass_postlist.cc.

Referenced by next(), and PostlistChunkReader().

const char* Brass::PostlistChunkReader::pos [private]

Definition at line 261 of file brass_postlist.cc.

Referenced by next(), and PostlistChunkReader().

Definition at line 267 of file brass_postlist.cc.

Referenced by get_wdf(), next(), and PostlistChunkReader().


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

Documentation for Xapian (version 1.2.13).
Generated on 9 Jan 2013 by Doxygen 1.5.9.