NetworkPostList Class Reference

A postlist in a remote database. More...

#include <net_postlist.h>

Inheritance diagram for NetworkPostList:

Inheritance graph
[legend]
Collaboration diagram for NetworkPostList:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 NetworkPostList (Xapian::Internal::RefCntPtr< const RemoteDatabase > db_, const string &term_)
 Default constructor.
Xapian::doccount get_termfreq () const
 Get number of documents indexed by this term.
Xapian::docid get_docid () const
 Get the current document ID.
Xapian::doclength get_doclength () const
 Get the length of the current document.
Xapian::termcount get_wdf () const
 Get the Within Document Frequency of the term in the current document.
PositionListread_position_list ()
 Read the position list for the term in the current document and return a pointer to it (owned by the PostList).
PositionListopen_position_list () const
 Read the position list for the term in the current document and return a pointer to it (not owned by the PostList).
PostListnext (Xapian::weight)
 Move to the next document in the postlist (the weight parameter is ignored).
PostListskip_to (Xapian::docid did, Xapian::weight weight)
 Skip forward to the next document with document ID >= the supplied document ID (the weight parameter is ignored).
bool at_end () const
 Return true if and only if we've moved off the end of the list.
string get_description () const
 Get a description of the postlist.

Private Member Functions

void append_posting (const string &serialised)
 Append a posting to the end of the postlist.

Private Attributes

Xapian::Internal::RefCntPtr<
const RemoteDatabase
db
string term
string postings
bool started
const char * pos
const char * pos_end
Xapian::docid lastdocid
Xapian::termcount lastwdf
Xapian::doclength lastdoclen
Xapian::Internal::RefCntPtr<
PositionList
lastposlist
Xapian::doccount termfreq

Friends

class RemoteDatabase

Detailed Description

A postlist in a remote database.

Definition at line 36 of file net_postlist.h.


Constructor & Destructor Documentation

NetworkPostList::NetworkPostList ( Xapian::Internal::RefCntPtr< const RemoteDatabase db_,
const string &  term_ 
) [inline]

Default constructor.

Definition at line 63 of file net_postlist.h.

References db, term, and termfreq.


Member Function Documentation

void NetworkPostList::append_posting ( const string &  serialised  )  [inline, private]

Append a posting to the end of the postlist.

Definition at line 55 of file net_postlist.h.

References Assert, pos, postings, and started.

Referenced by RemoteDatabase::read_post_list().

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

Get number of documents indexed by this term.

Implements LeafPostList.

Definition at line 32 of file net_postlist.cc.

References termfreq.

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

Get the current document ID.

Implements Xapian::PostingIterator::Internal.

Definition at line 38 of file net_postlist.cc.

References lastdocid.

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

Get the length of the current document.

Implements Xapian::PostingIterator::Internal.

Definition at line 44 of file net_postlist.cc.

References lastdoclen.

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

Get the Within Document Frequency of the term in the current document.

Reimplemented from Xapian::PostingIterator::Internal.

Definition at line 50 of file net_postlist.cc.

References lastwdf.

PositionList * NetworkPostList::read_position_list (  )  [virtual]

Read the position list for the term in the current document and return a pointer to it (owned by the PostList).

Reimplemented from Xapian::PostingIterator::Internal.

Definition at line 56 of file net_postlist.cc.

References db, Xapian::Internal::RefCntPtr< T >::get(), lastdocid, lastposlist, and term.

PositionList * NetworkPostList::open_position_list (  )  const [virtual]

Read the position list for the term in the current document and return a pointer to it (not owned by the PostList).

Reimplemented from Xapian::PostingIterator::Internal.

Definition at line 63 of file net_postlist.cc.

References db, lastdocid, and term.

PostList * NetworkPostList::next ( Xapian::weight   )  [virtual]

Move to the next document in the postlist (the weight parameter is ignored).

Implements Xapian::PostingIterator::Internal.

Definition at line 69 of file net_postlist.cc.

References decode_length(), lastdocid, lastdoclen, lastwdf, pos, pos_end, postings, started, and unserialise_double().

PostList * NetworkPostList::skip_to ( Xapian::docid  did,
Xapian::weight  weight 
) [virtual]

Skip forward to the next document with document ID >= the supplied document ID (the weight parameter is ignored).

Implements Xapian::PostingIterator::Internal.

Definition at line 90 of file net_postlist.cc.

References lastdocid, Xapian::PostingIterator::Internal::next(), pos, and started.

bool NetworkPostList::at_end (  )  const [virtual]

Return true if and only if we've moved off the end of the list.

Implements Xapian::PostingIterator::Internal.

Definition at line 100 of file net_postlist.cc.

References pos, and started.

string NetworkPostList::get_description (  )  const [virtual]

Get a description of the postlist.

Implements Xapian::PostingIterator::Internal.

Definition at line 106 of file net_postlist.cc.

References term.


Friends And Related Function Documentation

friend class RemoteDatabase [friend]

Definition at line 37 of file net_postlist.h.


Member Data Documentation

Xapian::Internal::RefCntPtr<const RemoteDatabase> NetworkPostList::db [private]

Definition at line 39 of file net_postlist.h.

Referenced by NetworkPostList(), open_position_list(), and read_position_list().

string NetworkPostList::term [private]

Definition at line 40 of file net_postlist.h.

Referenced by get_description(), NetworkPostList(), open_position_list(), and read_position_list().

string NetworkPostList::postings [private]

Definition at line 42 of file net_postlist.h.

Referenced by append_posting(), and next().

bool NetworkPostList::started [private]

Definition at line 43 of file net_postlist.h.

Referenced by append_posting(), at_end(), next(), and skip_to().

const char* NetworkPostList::pos [private]

Definition at line 44 of file net_postlist.h.

Referenced by append_posting(), at_end(), next(), and skip_to().

const char* NetworkPostList::pos_end [private]

Definition at line 45 of file net_postlist.h.

Referenced by next().

Xapian::docid NetworkPostList::lastdocid [private]

Definition at line 47 of file net_postlist.h.

Referenced by get_docid(), next(), open_position_list(), read_position_list(), and skip_to().

Xapian::termcount NetworkPostList::lastwdf [private]

Definition at line 48 of file net_postlist.h.

Referenced by get_wdf(), and next().

Xapian::doclength NetworkPostList::lastdoclen [private]

Definition at line 49 of file net_postlist.h.

Referenced by get_doclength(), and next().

Xapian::Internal::RefCntPtr<PositionList> NetworkPostList::lastposlist [private]

Definition at line 50 of file net_postlist.h.

Referenced by read_position_list().

Xapian::doccount NetworkPostList::termfreq [private]

Definition at line 52 of file net_postlist.h.

Referenced by get_termfreq(), and NetworkPostList().


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.