Xapian::RSet Class Reference

Class representing a set of documents judged as relevant. More...

`#include <rset.h>`

## Public Member Functions

| RSet (const RSet &o)
| Copying is allowed.
RSet & | operator= (const RSet &o)
| Copying is allowed.
| RSet (RSet &&o)
| Move constructor.
RSet & | operator= (RSet &&o)
| Move assignment operator.
| RSet ()
| Default constructor.
| ~RSet ()
| Destructor.
Xapian::doccount | size () const
| Return number of documents in this RSet object.
bool | empty () const
| Return true if this RSet object is empty.
void | swap (RSet &o)
| Efficiently swap this RSet object with another.
void | add_document (Xapian::docid did)
| Mark a document as relevant.
void | add_document (const Xapian::MSetIterator &it)
| Mark a document as relevant.
void | remove_document (Xapian::docid did)
| Unmark a document as relevant.
void | remove_document (const Xapian::MSetIterator &it)
| Unmark a document as relevant.
bool | contains (Xapian::docid did) const
| Check if a document is marked as relevant.
bool | contains (const Xapian::MSetIterator &it) const
| Check if a document is marked as relevant.
std::string | get_description () const
| Return a string describing this object.

## Detailed Description

Class representing a set of documents judged as relevant.

## Constructor & Destructor Documentation

## RSet() [1/2]

Xapian::RSet::RSet | ( | const RSet & | o | ) |

Copying is allowed.

The internals are reference counted, so copying is cheap.

References RSet().

Referenced by operator=(), operator=(), RSet(), RSet(), RSet(), and swap().

## RSet() [2/2]

Xapian::RSet::RSet | ( |  | ) |

Default constructor.

Creates an empty RSet.

References RSet().

## Member Function Documentation

## add_document() [1/2]

void Xapian::RSet::add_document | ( | const Xapian::MSetIterator & | it | ) |

inline

Mark a document as relevant.

If did is already marked as relevant, nothing happens.

References add_document().

## add_document() [2/2]

void Xapian::RSet::add_document | ( | Xapian::docid | did | ) |

Mark a document as relevant.

If did is already marked as relevant, nothing happens.

Referenced by add_document().

## operator=()

RSet & Xapian::RSet::operator= | ( | const RSet & | o | ) |

Copying is allowed.

The internals are reference counted, so assignment is cheap.

References RSet().

## remove_document() [1/2]

void Xapian::RSet::remove_document | ( | const Xapian::MSetIterator & | it | ) |

inline

Unmark a document as relevant.

If did is not marked as relevant, nothing happens.

References remove_document().

## remove_document() [2/2]

void Xapian::RSet::remove_document | ( | Xapian::docid | did | ) |

Unmark a document as relevant.

If did is not marked as relevant, nothing happens.

Referenced by remove_document().

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

- xapian/rset.h