xapian-core  1.4.27
Public Member Functions | Private Member Functions | Private Attributes | List of all members
DocumentValueList Class Referencefinal

Iteration over values in a document. More...

#include <documentvaluelist.h>

+ Inheritance diagram for DocumentValueList:
+ Collaboration diagram for DocumentValueList:

Public Member Functions

 DocumentValueList (const Xapian::Internal::intrusive_ptr< Xapian::Document::Internal > &doc_)
 
Xapian::docid get_docid () const
 Return the docid at the current position. More...
 
std::string get_value () const
 Return the value at the current position. More...
 
Xapian::valueno get_valueno () const
 Return the value slot for the current position/this iterator. 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 slot)
 The parameter is actually a Xapian::valueno for this subclass. 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 DocumentValueList &)
 Don't allow assignment. More...
 
 DocumentValueList (const DocumentValueList &)
 Don't allow copying. More...
 

Private Attributes

Xapian::Internal::intrusive_ptr< const Xapian::Document::Internaldoc
 Document internals we're iterating over. More...
 
Xapian::Document::Internal::document_values::const_iterator it
 Iterator over the map inside doc. More...
 

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

Iteration over values in a document.

Definition at line 29 of file documentvaluelist.h.

Constructor & Destructor Documentation

◆ DocumentValueList() [1/2]

DocumentValueList::DocumentValueList ( const DocumentValueList )
private

Don't allow copying.

◆ DocumentValueList() [2/2]

DocumentValueList::DocumentValueList ( const Xapian::Internal::intrusive_ptr< Xapian::Document::Internal > &  doc_)
inlineexplicit

Member Function Documentation

◆ at_end()

bool DocumentValueList::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 55 of file documentvaluelist.cc.

Referenced by DocumentValueList().

◆ get_description()

string DocumentValueList::get_description ( ) const
virtual

Return a string description of this object.

Implements Xapian::ValueIterator::Internal.

Definition at line 77 of file documentvaluelist.cc.

References description_append(), and Xapian::Internal::str().

Referenced by DocumentValueList().

◆ get_docid()

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

Return the docid at the current position.

Implements Xapian::ValueIterator::Internal.

Definition at line 35 of file documentvaluelist.cc.

Referenced by DocumentValueList().

◆ get_value()

string DocumentValueList::get_value ( ) const
virtual

Return the value at the current position.

Implements Xapian::ValueIterator::Internal.

Definition at line 48 of file documentvaluelist.cc.

References Assert.

Referenced by DocumentValueList().

◆ get_valueno()

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

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

Implements Xapian::ValueIterator::Internal.

Definition at line 41 of file documentvaluelist.cc.

References Assert.

Referenced by DocumentValueList().

◆ next()

void DocumentValueList::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 61 of file documentvaluelist.cc.

Referenced by DocumentValueList().

◆ operator=()

void DocumentValueList::operator= ( const DocumentValueList )
private

Don't allow assignment.

◆ skip_to()

void DocumentValueList::skip_to ( Xapian::docid  slot)
virtual

The parameter is actually a Xapian::valueno for this subclass.

Implements Xapian::ValueIterator::Internal.

Definition at line 71 of file documentvaluelist.cc.

Referenced by DocumentValueList().

Member Data Documentation

◆ doc

Xapian::Internal::intrusive_ptr<const Xapian::Document::Internal> DocumentValueList::doc
private

Document internals we're iterating over.

Definition at line 37 of file documentvaluelist.h.

◆ it

Xapian::Document::Internal::document_values::const_iterator DocumentValueList::it
private

Iterator over the map inside doc.

If we haven't started yet, this will be set to: doc->values.end()

Definition at line 43 of file documentvaluelist.h.


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