xapian-core  1.4.27
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ChertMetadataTermList Class Reference

#include <chert_metadata.h>

+ Inheritance diagram for ChertMetadataTermList:
+ Collaboration diagram for ChertMetadataTermList:

Public Member Functions

 ChertMetadataTermList (Xapian::Internal::intrusive_ptr< const Xapian::Database::Internal > database_, ChertCursor *cursor_, const std::string &prefix_)
 
 ~ChertMetadataTermList ()
 
std::string get_termname () const
 Returns the current termname. More...
 
Xapian::doccount get_termfreq () const
 Return the term frequency for the term at the current position. More...
 
TermListnext ()
 Advance to the next term in the list. More...
 
TermListskip_to (const std::string &key)
 Advance to the first key which is >= key. More...
 
bool at_end () const
 True if we're off the end of the list. More...
 
- Public Member Functions inherited from AllTermsList
virtual Xapian::termcount get_approx_size () const
 Return approximate size of this termlist. More...
 
virtual Xapian::termcount get_wdf () const
 Return the wdf for the term at the current position. More...
 
virtual Xapian::termcount positionlist_count () const
 Return true if the current position is past the last term in this list. More...
 
virtual Xapian::PositionIterator positionlist_begin () const
 Return a PositionIterator for the current position. More...
 
- Public Member Functions inherited from Xapian::TermIterator::Internal
virtual ~Internal ()
 We have virtual methods and want to be able to delete derived classes using a pointer to the base class, so we need a virtual destructor. More...
 
virtual void accumulate_stats (Xapian::Internal::ExpandStats &stats) const
 Collate weighting information for the current term. More...
 
virtual const std::vector< Xapian::termpos > * get_vector_termpos () const
 Get pointer to vector<termpos> if that's the internal representation. More...
 
- Public Member Functions inherited from Xapian::Internal::intrusive_base
 intrusive_base ()
 Construct with no references. More...
 

Private Member Functions

 ChertMetadataTermList (const ChertMetadataTermList &)
 Copying is not allowed. More...
 
void operator= (const ChertMetadataTermList &)
 Assignment is not allowed. More...
 

Private Attributes

Xapian::Internal::intrusive_ptr< const Xapian::Database::Internaldatabase
 Keep a reference to our database to stop it being deleted. More...
 
ChertCursorcursor
 A cursor which runs through the postlist table reading metadata keys. More...
 
std::string prefix
 The prefix that all returned keys must have. More...
 

Additional Inherited Members

- Public Attributes inherited from Xapian::TermIterator::Internal
size_t shard_index = 0
 Which shard of a multidatabase this is from. More...
 
- Public Attributes inherited from Xapian::Internal::intrusive_base
unsigned _refs
 Reference count. More...
 
- Protected Member Functions inherited from AllTermsList
 AllTermsList ()
 Only constructable as a base class for derived classes. More...
 
- Protected Member Functions inherited from Xapian::TermIterator::Internal
 Internal ()
 Only constructable as a base class for derived classes. More...
 

Detailed Description

Definition at line 37 of file chert_metadata.h.

Constructor & Destructor Documentation

◆ ChertMetadataTermList() [1/2]

ChertMetadataTermList::ChertMetadataTermList ( const ChertMetadataTermList )
private

Copying is not allowed.

◆ ChertMetadataTermList() [2/2]

ChertMetadataTermList::ChertMetadataTermList ( Xapian::Internal::intrusive_ptr< const Xapian::Database::Internal database_,
ChertCursor cursor_,
const std::string &  prefix_ 
)

Definition at line 33 of file chert_metadata.cc.

References Assert, cursor, ChertCursor::find_entry_lt(), LOGCALL_CTOR, and prefix.

◆ ~ChertMetadataTermList()

ChertMetadataTermList::~ChertMetadataTermList ( )

Definition at line 45 of file chert_metadata.cc.

References cursor, and LOGCALL_DTOR.

Member Function Documentation

◆ at_end()

bool ChertMetadataTermList::at_end ( ) const
virtual

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

Implements AllTermsList.

Definition at line 100 of file chert_metadata.cc.

References ChertCursor::after_end(), cursor, LOGCALL, and RETURN.

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

◆ get_termfreq()

Xapian::doccount ChertMetadataTermList::get_termfreq ( ) const
virtual

Return the term frequency for the term at the current position.

Not meaningful for a ChertMetadataTermList.

Implements AllTermsList.

Definition at line 62 of file chert_metadata.cc.

◆ get_termname()

string ChertMetadataTermList::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 52 of file chert_metadata.cc.

References Assert, at_end(), ChertCursor::current_key, cursor, LOGCALL, prefix, RETURN, and startswith().

◆ next()

TermList * ChertMetadataTermList::next ( )
virtual

Advance to the next term in the list.

Implements AllTermsList.

Definition at line 68 of file chert_metadata.cc.

References ChertCursor::after_end(), Assert, at_end(), ChertCursor::current_key, cursor, LOGCALL, ChertCursor::next(), prefix, RETURN, startswith(), and ChertCursor::to_end().

◆ operator=()

void ChertMetadataTermList::operator= ( const ChertMetadataTermList )
private

Assignment is not allowed.

◆ skip_to()

TermList * ChertMetadataTermList::skip_to ( const std::string &  key)
virtual

Advance to the first key which is >= key.

Implements AllTermsList.

Definition at line 83 of file chert_metadata.cc.

References ChertCursor::after_end(), Assert, at_end(), ChertCursor::current_key, cursor, ChertCursor::find_entry_ge(), LOGCALL, prefix, RETURN, startswith(), and ChertCursor::to_end().

Member Data Documentation

◆ cursor

ChertCursor* ChertMetadataTermList::cursor
private

A cursor which runs through the postlist table reading metadata keys.

Definition at line 49 of file chert_metadata.h.

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

◆ database

Xapian::Internal::intrusive_ptr<const Xapian::Database::Internal> ChertMetadataTermList::database
private

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

Definition at line 45 of file chert_metadata.h.

◆ prefix

std::string ChertMetadataTermList::prefix
private

The prefix that all returned keys must have.

Definition at line 53 of file chert_metadata.h.

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


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