|
xapian-core
2.0.0
|
Class representing a set of documents judged as relevant. More...
#include <rset.h>
Collaboration diagram for Xapian::RSet:Classes | |
| class | Internal |
Public Member Functions | |
| RSet (const RSet &o) | |
| Copying is allowed. More... | |
| RSet & | operator= (const RSet &o) |
| Copying is allowed. More... | |
| RSet (RSet &&o) | |
| Move constructor. More... | |
| RSet & | operator= (RSet &&o) |
| Move assignment operator. More... | |
| RSet () | |
| Default constructor. More... | |
| ~RSet () | |
| Destructor. More... | |
| Xapian::doccount | size () const |
| Return number of documents in this RSet object. More... | |
| bool | empty () const |
| Return true if this RSet object is empty. More... | |
| void | swap (RSet &o) |
| Efficiently swap this RSet object with another. More... | |
| void | add_document (Xapian::docid did) |
| Mark a document as relevant. More... | |
| void | add_document (const Xapian::MSetIterator &it) |
| Mark a document as relevant. More... | |
| void | remove_document (Xapian::docid did) |
| Unmark a document as relevant. More... | |
| void | remove_document (const Xapian::MSetIterator &it) |
| Unmark a document as relevant. More... | |
| bool | contains (Xapian::docid did) const |
| Check if a document is marked as relevant. More... | |
| bool | contains (const Xapian::MSetIterator &it) const |
| Check if a document is marked as relevant. More... | |
| std::string | get_description () const |
| Return a string describing this object. More... | |
Private Member Functions | |
| RSet (Internal *internal_) | |
Private Attributes | |
| Xapian::Internal::intrusive_ptr< Internal > | internal |
|
default |
Copying is allowed.
The internals are reference counted, so copying is cheap.
|
default |
Move constructor.
| Xapian::RSet::RSet | ( | ) |
Default constructor.
Creates an empty RSet.
Definition at line 42 of file rset.cc.
Referenced by Xapian::RSet::Internal::shard().
|
explicitprivate |
|
inline |
| void Xapian::RSet::add_document | ( | Xapian::docid | did | ) |
Mark a document as relevant.
If did is already marked as relevant, nothing happens.
Definition at line 55 of file rset.cc.
References Xapian::RSet::Internal::docs, and rare.
Referenced by DEFINE_TESTCASE(), main(), and unserialise_rset().
|
inline |
Check if a document is marked as relevant.
Definition at line 118 of file rset.h.
References contains().
| bool Xapian::RSet::contains | ( | Xapian::docid | did | ) | const |
|
inline |
Return true if this RSet object is empty.
Definition at line 81 of file rset.h.
Referenced by Xapian::build_termlist_tree(), DEFINE_TESTCASE(), Xapian::ESet::Internal::expand(), Xapian::Enquire::Internal::get_eset(), and main().
| string Xapian::RSet::get_description | ( | ) | const |
Return a string describing this object.
Definition at line 80 of file rset.cc.
References internal, and Xapian::Internal::str().
Referenced by DEFINE_TESTCASE().
Copying is allowed.
The internals are reference counted, so assignment is cheap.
|
inline |
| void Xapian::RSet::remove_document | ( | Xapian::docid | did | ) |
| Xapian::doccount Xapian::RSet::size | ( | ) | const |
Return number of documents in this RSet object.
Definition at line 49 of file rset.cc.
Referenced by Xapian::Weight::Internal::accumulate_stats(), DEFINE_TESTCASE(), and Xapian::Enquire::Internal::get_eset().
|
inline |
|
private |
Reference counted internals.
Definition at line 44 of file rset.h.
Referenced by Xapian::Weight::Internal::accumulate_stats(), Xapian::build_termlist_tree(), get_description(), serialise_rset(), and swap().