FlintSpellingWordsList Class Reference

#include <flint_spellingwordslist.h>

Inheritance diagram for FlintSpellingWordsList:

Inheritance graph
[legend]
Collaboration diagram for FlintSpellingWordsList:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FlintSpellingWordsList (Xapian::Internal::RefCntPtr< const Xapian::Database::Internal > database_, FlintCursor *cursor_)
 ~FlintSpellingWordsList ()
 Destructor.
string get_termname () const
 Returns the current termname.
Xapian::doccount get_termfreq () const
 Returns the term frequency of the current term.
Xapian::termcount get_collection_freq () const
 Returns the collection frequency of the current term.
TermListnext ()
 Advance to the next term in the list.
TermListskip_to (const string &tname)
 Advance to the first term which is >= tname.
bool at_end () const
 True if we're off the end of the list.

Private Member Functions

 FlintSpellingWordsList (const FlintSpellingWordsList &)
 Copying is not allowed.
void operator= (const FlintSpellingWordsList &)
 Assignment is not allowed.
void read_termfreq () const
 Read and cache the term frequency.

Private Attributes

Xapian::Internal::RefCntPtr<
const Xapian::Database::Internal
database
 Keep a reference to our database to stop it being deleted.
FlintCursorcursor
 A cursor which runs through the spelling table reading termnames from the keys.
Xapian::termcount termfreq
 The term frequency of the term at the current position.

Detailed Description

Definition at line 30 of file flint_spellingwordslist.h.


Constructor & Destructor Documentation

FlintSpellingWordsList::FlintSpellingWordsList ( const FlintSpellingWordsList  )  [private]

Copying is not allowed.

FlintSpellingWordsList::FlintSpellingWordsList ( Xapian::Internal::RefCntPtr< const Xapian::Database::Internal database_,
FlintCursor cursor_ 
) [inline]

Definition at line 57 of file flint_spellingwordslist.h.

References cursor, and FlintCursor::find_entry().

FlintSpellingWordsList::~FlintSpellingWordsList (  ) 

Destructor.

Definition at line 32 of file flint_spellingwordslist.cc.

References cursor, and DEBUGCALL.


Member Function Documentation

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

Assignment is not allowed.

void FlintSpellingWordsList::read_termfreq (  )  const [private]

Read and cache the term frequency.

string FlintSpellingWordsList::get_termname (  )  const [virtual]

Returns the current termname.

Either next() or skip_to() must have been called before this method can be called.

Implements AllTermsList.

Definition at line 39 of file flint_spellingwordslist.cc.

References Assert, at_end(), FlintCursor::current_key, cursor, DEBUGCALL, and RETURN.

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

Returns the term frequency of the current term.

Either next() or skip_to() must have been called before this method can be called.

Implements AllTermsList.

Definition at line 50 of file flint_spellingwordslist.cc.

References Assert, at_end(), FlintCursor::current_key, FlintCursor::current_tag, cursor, DEBUGCALL, FlintCursor::read_tag(), and unpack_uint_last().

Xapian::termcount FlintSpellingWordsList::get_collection_freq (  )  const [virtual]

Returns the collection frequency of the current term.

Either next() or skip_to() must have been called before this method can be called.

Implements AllTermsList.

Definition at line 68 of file flint_spellingwordslist.cc.

TermList * FlintSpellingWordsList::next (  )  [virtual]

Advance to the next term in the list.

Implements AllTermsList.

Definition at line 74 of file flint_spellingwordslist.cc.

References FlintCursor::after_end(), Assert, at_end(), FlintCursor::current_key, cursor, DEBUGCALL, FlintCursor::next(), RETURN, startswith(), and FlintCursor::to_end().

TermList * FlintSpellingWordsList::skip_to ( const string &  tname  ) 

Advance to the first term which is >= tname.

Definition at line 89 of file flint_spellingwordslist.cc.

References FlintCursor::after_end(), Assert, at_end(), FlintCursor::current_key, cursor, DEBUGCALL, FlintCursor::find_entry_ge(), RETURN, startswith(), and FlintCursor::to_end().

bool FlintSpellingWordsList::at_end (  )  const [virtual]

True if we're off the end of the list.

Implements AllTermsList.

Definition at line 106 of file flint_spellingwordslist.cc.

References FlintCursor::after_end(), cursor, DEBUGCALL, and RETURN.

Referenced by get_termfreq(), get_termname(), next(), and skip_to().


Member Data Documentation

Xapian::Internal::RefCntPtr<const Xapian::Database::Internal> FlintSpellingWordsList::database [private]

Keep a reference to our database to stop it being deleted.

Definition at line 38 of file flint_spellingwordslist.h.

FlintCursor* FlintSpellingWordsList::cursor [private]

A cursor which runs through the spelling table reading termnames from the keys.

Definition at line 43 of file flint_spellingwordslist.h.

Referenced by at_end(), FlintSpellingWordsList(), get_termfreq(), get_termname(), next(), skip_to(), and ~FlintSpellingWordsList().

Xapian::termcount FlintSpellingWordsList::termfreq [mutable, private]

The term frequency of the term at the current position.

If this value is zero, then we haven't read the term frequency or collection frequency for the current term yet. We need to call read_termfreq() to read these.

Definition at line 51 of file flint_spellingwordslist.h.


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.