xapian-core  2.0.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Honey::DocLenChunkReader Class Reference

#include <honey_alldocspostlist.h>

Public Member Functions

 DocLenChunkReader ()
 Create a DocLenChunkReader which is already at_end(). More...
 
bool update (HoneyCursor *cursor)
 Update to use the chunk currently pointed to by cursor. More...
 
bool at_end () const
 
Xapian::docid get_docid () const
 
Xapian::termcount get_doclength () const
 
bool next ()
 
bool skip_to (Xapian::docid target)
 
bool find_doclength (Xapian::docid target)
 Searches the whole chunk (skip_to() only advances). More...
 
Xapian::termcount back ()
 Return the last document length in this chunk. More...
 

Private Member Functions

bool read_doclen (const unsigned char *q)
 

Private Attributes

unsigned const char * p = nullptr
 
unsigned const char * end
 
Xapian::docid did
 
Xapian::termcount doclen
 
unsigned width
 

Detailed Description

Definition at line 90 of file honey_alldocspostlist.h.

Constructor & Destructor Documentation

◆ DocLenChunkReader()

Honey::DocLenChunkReader::DocLenChunkReader ( )
inline

Create a DocLenChunkReader which is already at_end().

Definition at line 104 of file honey_alldocspostlist.h.

Member Function Documentation

◆ at_end()

bool Honey::DocLenChunkReader::at_end ( ) const
inline

◆ back()

Xapian::termcount Honey::DocLenChunkReader::back ( )
inline

Return the last document length in this chunk.

Definition at line 129 of file honey_alldocspostlist.h.

References doclen, end, read_doclen(), and width.

Referenced by HoneyDatabase::get_doclength().

◆ find_doclength()

bool Honey::DocLenChunkReader::find_doclength ( Xapian::docid  target)

Searches the whole chunk (skip_to() only advances).

Don't call this method and any of next()/skip_to()/at_end() on the same object (unless there's an intervening call to update()).

Return false if this isn't the right chunk.

Definition at line 296 of file honey_alldocspostlist.cc.

References Assert, did, end, p, read_doclen(), and width.

Referenced by HoneyDatabase::get_doclength().

◆ get_docid()

Xapian::docid Honey::DocLenChunkReader::get_docid ( ) const
inline

Definition at line 111 of file honey_alldocspostlist.h.

References did.

Referenced by HoneyAllDocsPostList::get_docid().

◆ get_doclength()

Xapian::termcount Honey::DocLenChunkReader::get_doclength ( ) const
inline

Definition at line 113 of file honey_alldocspostlist.h.

References doclen.

Referenced by HoneyDatabase::get_doclength().

◆ next()

bool Honey::DocLenChunkReader::next ( )

Definition at line 257 of file honey_alldocspostlist.cc.

References did, end, p, read_doclen(), and width.

Referenced by HoneyAllDocsPostList::next(), and skip_to().

◆ read_doclen()

bool Honey::DocLenChunkReader::read_doclen ( const unsigned char *  q)
private

Definition at line 202 of file honey_alldocspostlist.cc.

References doclen, unaligned_read2(), unaligned_read4(), and width.

Referenced by back(), find_doclength(), next(), skip_to(), and update().

◆ skip_to()

bool Honey::DocLenChunkReader::skip_to ( Xapian::docid  target)

Definition at line 272 of file honey_alldocspostlist.cc.

References did, end, next(), p, read_doclen(), and width.

Referenced by HoneyAllDocsPostList::check(), and HoneyAllDocsPostList::skip_to().

◆ update()

bool Honey::DocLenChunkReader::update ( HoneyCursor cursor)

Member Data Documentation

◆ did

Xapian::docid Honey::DocLenChunkReader::did
private

Definition at line 94 of file honey_alldocspostlist.h.

Referenced by find_doclength(), get_docid(), next(), skip_to(), and update().

◆ doclen

Xapian::termcount Honey::DocLenChunkReader::doclen
private

Definition at line 96 of file honey_alldocspostlist.h.

Referenced by back(), get_doclength(), and read_doclen().

◆ end

unsigned const char* Honey::DocLenChunkReader::end
private

Definition at line 92 of file honey_alldocspostlist.h.

Referenced by back(), find_doclength(), next(), skip_to(), and update().

◆ p

unsigned const char* Honey::DocLenChunkReader::p = nullptr
private

Definition at line 91 of file honey_alldocspostlist.h.

Referenced by at_end(), find_doclength(), next(), skip_to(), and update().

◆ width

unsigned Honey::DocLenChunkReader::width
private

Definition at line 98 of file honey_alldocspostlist.h.

Referenced by back(), find_doclength(), next(), read_doclen(), skip_to(), and update().


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