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

Honey class for value streams. More...

#include <honey_valuelist.h>

+ Inheritance diagram for HoneyValueList:
+ Collaboration diagram for HoneyValueList:

Public Member Functions

 HoneyValueList (Xapian::valueno slot_, const HoneyDatabase *db_)
 
 ~HoneyValueList ()
 
Xapian::docid get_docid () const
 Return the docid at the current position. More...
 
Xapian::valueno get_valueno () const
 Return the value slot for the current position/this iterator. More...
 
std::string get_value () const
 Return the value at the current position. More...
 
bool at_end () const
 Return true if the current position is past the last entry in this list. More...
 
void next ()
 Advance the current position to the next document in the value stream. More...
 
void skip_to (Xapian::docid)
 Skip forward to the specified docid. More...
 
std::string get_description () const
 Return a string description of this object. More...
 
- Public Member Functions inherited from Xapian::ValueIterator::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 bool check (Xapian::docid did)
 Check if the specified docid occurs in this valuestream. More...
 
- Public Member Functions inherited from Xapian::Internal::intrusive_base
 intrusive_base ()
 Construct with no references. More...
 

Private Member Functions

void operator= (const HoneyValueList &)
 Don't allow assignment. More...
 
 HoneyValueList (const HoneyValueList &)
 Don't allow copying. More...
 
bool update_reader ()
 Update reader to use the chunk currently pointed to by cursor. More...
 

Private Attributes

HoneyCursorcursor = nullptr
 
Honey::ValueChunkReader reader
 
Xapian::valueno slot
 
Xapian::Internal::intrusive_ptr< const HoneyDatabasedb
 

Additional Inherited Members

- Public Attributes inherited from Xapian::Internal::intrusive_base
unsigned _refs
 Reference count. More...
 
- Protected Member Functions inherited from Xapian::ValueIterator::Internal
 Internal ()
 Only constructable as a base class for derived classes. More...
 

Detailed Description

Honey class for value streams.

Definition at line 31 of file honey_valuelist.h.

Constructor & Destructor Documentation

◆ HoneyValueList() [1/2]

HoneyValueList::HoneyValueList ( const HoneyValueList )
private

Don't allow copying.

◆ HoneyValueList() [2/2]

HoneyValueList::HoneyValueList ( Xapian::valueno  slot_,
const HoneyDatabase db_ 
)
inline

Definition at line 50 of file honey_valuelist.h.

◆ ~HoneyValueList()

HoneyValueList::~HoneyValueList ( )

Definition at line 45 of file honey_valuelist.cc.

Member Function Documentation

◆ at_end()

bool HoneyValueList::at_end ( ) const
virtual

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

Implements Xapian::ValueIterator::Internal.

Definition at line 71 of file honey_valuelist.cc.

◆ get_description()

string HoneyValueList::get_description ( ) const
virtual

Return a string description of this object.

Implements Xapian::ValueIterator::Internal.

Definition at line 137 of file honey_valuelist.cc.

References Xapian::Internal::str().

◆ get_docid()

Xapian::docid HoneyValueList::get_docid ( ) const
virtual

Return the docid at the current position.

Implements Xapian::ValueIterator::Internal.

Definition at line 51 of file honey_valuelist.cc.

References Assert.

◆ get_value()

std::string HoneyValueList::get_value ( ) const
virtual

Return the value at the current position.

Implements Xapian::ValueIterator::Internal.

Definition at line 64 of file honey_valuelist.cc.

References Assert.

◆ get_valueno()

Xapian::valueno HoneyValueList::get_valueno ( ) const
virtual

Return the value slot for the current position/this iterator.

Implements Xapian::ValueIterator::Internal.

Definition at line 58 of file honey_valuelist.cc.

◆ next()

void HoneyValueList::next ( )
virtual

Advance the current position to the next document in the value stream.

The list starts before the first entry in the list, so next(), skip_to() or check() must be called before any methods which need the context of the current position.

Implements Xapian::ValueIterator::Internal.

Definition at line 77 of file honey_valuelist.cc.

References Honey::make_valuechunk_key().

◆ operator=()

void HoneyValueList::operator= ( const HoneyValueList )
private

Don't allow assignment.

◆ skip_to()

void HoneyValueList::skip_to ( Xapian::docid  )
virtual

Skip forward to the specified docid.

If the specified docid isn't in the list, position ourselves on the first document after it (or at_end() if no greater docids are present).

Implements Xapian::ValueIterator::Internal.

Definition at line 101 of file honey_valuelist.cc.

References Assert, Honey::make_valuechunk_key(), and rare.

◆ update_reader()

bool HoneyValueList::update_reader ( )
private

Update reader to use the chunk currently pointed to by cursor.

Definition at line 34 of file honey_valuelist.cc.

References Honey::docid_from_key().

Member Data Documentation

◆ cursor

HoneyCursor* HoneyValueList::cursor = nullptr
private

Definition at line 38 of file honey_valuelist.h.

◆ db

Xapian::Internal::intrusive_ptr<const HoneyDatabase> HoneyValueList::db
private

Definition at line 44 of file honey_valuelist.h.

◆ reader

Honey::ValueChunkReader HoneyValueList::reader
private

Definition at line 40 of file honey_valuelist.h.

◆ slot

Xapian::valueno HoneyValueList::slot
private

Definition at line 42 of file honey_valuelist.h.


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