xapian-core  2.0.0
Private Member Functions | Friends | List of all members
RemoteDocument Class Reference

A document read from a RemoteDatabase. More...

#include <remote-document.h>

+ Inheritance diagram for RemoteDocument:
+ Collaboration diagram for RemoteDocument:

Protected Member Functions

std::string fetch_value (Xapian::valueno slot) const
 Implementation of virtual methods. More...
 
void fetch_all_values (std::map< Xapian::valueno, std::string > &values_) const
 Implementation of virtual methods. More...
 
std::string fetch_data () const
 Implementation of virtual methods. More...
 
- Protected Member Functions inherited from Xapian::Document::Internal
 Internal (Xapian::Internal::intrusive_ptr< const Xapian::Database::Internal > database_, Xapian::docid did_)
 Constructor used by subclasses. More...
 
 Internal (const Xapian::Database::Internal *database_, Xapian::docid did_, std::string &&data_, std::map< Xapian::valueno, std::string > &&values_)
 Constructor used by RemoteDocument subclass. More...
 

Private Member Functions

void operator= (const RemoteDocument &)
 Don't allow assignment. More...
 
 RemoteDocument (const RemoteDocument &)
 Don't allow copying. More...
 
 RemoteDocument (const Xapian::Database::Internal *db, Xapian::docid did_, std::string &&data_, std::map< Xapian::valueno, std::string > &&values_)
 Private constructor - only called by RemoteDatabase::open_document(). More...
 

Friends

class RemoteDatabase
 RemoteDocument::open_document() needs to call our private constructor. More...
 

Additional Inherited Members

- Public Types inherited from Xapian::Document::Internal
enum  remove_posting_result { OK , NO_TERM , NO_POS }
 
- Public Member Functions inherited from Xapian::Document::Internal
 Internal ()
 Construct an empty document. More...
 
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...
 
bool data_modified () const
 Return true if the document data might have been modified. More...
 
bool terms_modified () const
 Return true if the document's terms might have been modified. More...
 
bool values_modified () const
 Return true if the document's values might have been modified. More...
 
bool modified () const
 Return true if the document might have been modified in any way. More...
 
bool positions_modified () const
 Return true if the document's term positions might have been modified. More...
 
Xapian::docid get_docid () const
 Get the document ID this document came from. More...
 
Xapian::doccount get_index () const
 Internal method used by MSet::diversify(). More...
 
void set_index (Xapian::doccount new_index)
 Internal method used by MSet::diversify(). More...
 
std::string get_data () const
 Get the document data. More...
 
void set_data (std::string_view data_)
 Set the document data. More...
 
void add_term (std::string_view term, Xapian::termcount wdf_inc)
 Add a term to this document. More...
 
bool remove_term (std::string_view term)
 Remove a term from this document. More...
 
void add_posting (std::string_view term, Xapian::termpos term_pos, Xapian::termcount wdf_inc)
 Add a posting for a term. More...
 
remove_posting_result remove_posting (std::string_view term, Xapian::termpos term_pos, Xapian::termcount wdf_dec)
 Remove a posting for a term. More...
 
remove_posting_result remove_postings (std::string_view term, Xapian::termpos term_pos_first, Xapian::termpos term_pos_last, Xapian::termcount wdf_dec, Xapian::termpos &n_removed)
 Remove a range of postings for a term. More...
 
void clear_terms ()
 Clear all terms from the document. More...
 
Xapian::termcount termlist_count () const
 Return the number of distinct terms in this document. More...
 
TermListopen_term_list () const
 Start iterating the terms in this document. More...
 
std::string get_value (Xapian::valueno slot) const
 Read a value slot in this document. More...
 
void add_value (Xapian::valueno slot, std::string_view value)
 Add a value to a slot in this document. More...
 
void clear_values ()
 Clear all value slots in this document. More...
 
Xapian::valueno values_count () const
 Count the value slots used in this document. More...
 
Xapian::ValueIterator values_begin () const
 
std::string get_description () const
 Return a string describing this object. More...
 
- Public Member Functions inherited from Xapian::Internal::intrusive_base
 intrusive_base ()
 Construct with no references. More...
 
- Public Attributes inherited from Xapian::Internal::intrusive_base
unsigned _refs
 Reference count. More...
 
- Protected Attributes inherited from Xapian::Document::Internal
std::unique_ptr< std::map< Xapian::valueno, std::string > > values
 Document value slots and their contents. More...
 
Xapian::Internal::intrusive_ptr< const Xapian::Database::Internaldatabase
 Database this document came from. More...
 
Xapian::docid did
 The document ID this document came from in database. More...
 

Detailed Description

A document read from a RemoteDatabase.

Definition at line 28 of file remote-document.h.

Constructor & Destructor Documentation

◆ RemoteDocument() [1/2]

RemoteDocument::RemoteDocument ( const RemoteDocument )
private

Don't allow copying.

◆ RemoteDocument() [2/2]

RemoteDocument::RemoteDocument ( const Xapian::Database::Internal db,
Xapian::docid  did_,
std::string &&  data_,
std::map< Xapian::valueno, std::string > &&  values_ 
)
inlineprivate

Private constructor - only called by RemoteDatabase::open_document().

Parameters
values_The values to set - passed by non-const reference, and may be modified by the call.

Definition at line 43 of file remote-document.h.

Member Function Documentation

◆ fetch_all_values()

void RemoteDocument::fetch_all_values ( std::map< Xapian::valueno, std::string > &  values_) const
protectedvirtual

Implementation of virtual methods.

Reimplemented from Xapian::Document::Internal.

Definition at line 40 of file remote-document.cc.

References Assert, and LOGCALL_VOID.

◆ fetch_data()

string RemoteDocument::fetch_data ( ) const
protectedvirtual

Implementation of virtual methods.

Reimplemented from Xapian::Document::Internal.

Definition at line 48 of file remote-document.cc.

References Assert, LOGCALL, and RETURN.

◆ fetch_value()

string RemoteDocument::fetch_value ( Xapian::valueno  slot) const
protectedvirtual

Implementation of virtual methods.

Reimplemented from Xapian::Document::Internal.

Definition at line 31 of file remote-document.cc.

References Assert, LOGCALL, and RETURN.

◆ operator=()

void RemoteDocument::operator= ( const RemoteDocument )
private

Don't allow assignment.

Friends And Related Function Documentation

◆ RemoteDatabase

friend class RemoteDatabase
friend

RemoteDocument::open_document() needs to call our private constructor.

Definition at line 36 of file remote-document.h.


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