xapian-core  1.4.25
Public Member Functions | Private Member Functions | Private Attributes | List of all members
InMemoryAllTermsList Class Reference

class for alltermslists over several databases More...

#include <inmemory_alltermslist.h>

+ Inheritance diagram for InMemoryAllTermsList:
+ Collaboration diagram for InMemoryAllTermsList:

Public Member Functions

 InMemoryAllTermsList (const std::map< string, InMemoryTerm > *tmap_, Xapian::Internal::intrusive_ptr< const InMemoryDatabase > database_, const string &prefix_)
 Constructor. More...
 
string get_termname () const
 Return the termname at the current position. More...
 
Xapian::doccount get_termfreq () const
 Return the term frequency for the term at the current position. More...
 
TermListskip_to (const string &tname)
 Skip forward to the specified term. More...
 
TermListnext ()
 next() causes the AllTermsList to move to the next term in the list. More...
 
bool at_end () const
 Return true if the current position is past the last term in this 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

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

Private Attributes

const std::map< string, InMemoryTerm > * tmap
 
std::map< string, InMemoryTerm >::const_iterator it
 
Xapian::Internal::intrusive_ptr< const InMemoryDatabasedatabase
 
string prefix
 

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

class for alltermslists over several databases

Definition at line 30 of file inmemory_alltermslist.h.

Constructor & Destructor Documentation

◆ InMemoryAllTermsList() [1/2]

InMemoryAllTermsList::InMemoryAllTermsList ( const InMemoryAllTermsList )
private

Copying is not allowed.

◆ InMemoryAllTermsList() [2/2]

InMemoryAllTermsList::InMemoryAllTermsList ( const std::map< string, InMemoryTerm > *  tmap_,
Xapian::Internal::intrusive_ptr< const InMemoryDatabase database_,
const string &  prefix_ 
)
inline

Constructor.

Definition at line 49 of file inmemory_alltermslist.h.

References at_end(), get_termfreq(), get_termname(), next(), and skip_to().

Member Function Documentation

◆ at_end()

bool InMemoryAllTermsList::at_end ( ) const
virtual

Return true if the current position is past the last term in this list.

Implements AllTermsList.

Definition at line 89 of file inmemory_alltermslist.cc.

References Assert, database, InMemoryDatabase::is_closed(), it, InMemoryDatabase::throw_database_closed(), and tmap.

Referenced by get_termfreq(), get_termname(), and InMemoryAllTermsList().

◆ get_termfreq()

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

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

Implements AllTermsList.

Definition at line 38 of file inmemory_alltermslist.cc.

References Assert, at_end(), database, InMemoryDatabase::is_closed(), it, and InMemoryDatabase::throw_database_closed().

Referenced by InMemoryAllTermsList().

◆ get_termname()

string InMemoryAllTermsList::get_termname ( ) const
virtual

Return the termname at the current position.

Implements AllTermsList.

Definition at line 29 of file inmemory_alltermslist.cc.

References Assert, at_end(), database, InMemoryDatabase::is_closed(), it, and InMemoryDatabase::throw_database_closed().

Referenced by InMemoryAllTermsList().

◆ next()

TermList * InMemoryAllTermsList::next ( )
virtual

next() causes the AllTermsList to move to the next term in the list.

Implements AllTermsList.

Definition at line 73 of file inmemory_alltermslist.cc.

References Assert, database, InMemoryDatabase::is_closed(), it, prefix, startswith(), InMemoryDatabase::throw_database_closed(), and tmap.

Referenced by InMemoryAllTermsList().

◆ operator=()

void InMemoryAllTermsList::operator= ( const InMemoryAllTermsList )
private

Assignment is not allowed.

◆ skip_to()

TermList * InMemoryAllTermsList::skip_to ( const string &  term)
virtual

Skip forward to the specified term.

If the specified term isn't in the list, position ourselves on the first term after term (or at_end() if no terms after term exist).

Implements AllTermsList.

Definition at line 48 of file inmemory_alltermslist.cc.

References Assert, database, InMemoryDatabase::is_closed(), it, prefix, startswith(), InMemoryDatabase::throw_database_closed(), and tmap.

Referenced by InMemoryAllTermsList().

Member Data Documentation

◆ database

Xapian::Internal::intrusive_ptr<const InMemoryDatabase> InMemoryAllTermsList::database
private

Definition at line 43 of file inmemory_alltermslist.h.

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

◆ it

std::map<string, InMemoryTerm>::const_iterator InMemoryAllTermsList::it
private

Definition at line 41 of file inmemory_alltermslist.h.

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

◆ prefix

string InMemoryAllTermsList::prefix
private

Definition at line 45 of file inmemory_alltermslist.h.

Referenced by next(), and skip_to().

◆ tmap

const std::map<string, InMemoryTerm>* InMemoryAllTermsList::tmap
private

Definition at line 39 of file inmemory_alltermslist.h.

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


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