xapian-core  2.0.0
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
Xapian::ESet Class Reference

Class representing a list of search results. More...

#include <eset.h>

+ Collaboration diagram for Xapian::ESet:

Classes

class  Internal
 Class which actually implements Xapian::ESet. More...
 

Public Member Functions

 ESet (const ESet &o)
 Copying is allowed. More...
 
ESetoperator= (const ESet &o)
 Copying is allowed. More...
 
 ESet (ESet &&o)
 Move constructor. More...
 
ESetoperator= (ESet &&o)
 Move assignment operator. More...
 
 ESet ()
 Default constructor. More...
 
 ~ESet ()
 Destructor. More...
 
Xapian::termcount size () const
 Return number of items in this ESet object. More...
 
bool empty () const
 Return true if this ESet object is empty. More...
 
Xapian::termcount get_ebound () const
 Return a bound on the full size of this ESet object. More...
 
void swap (ESet &o)
 Efficiently swap this ESet object with another. More...
 
ESetIterator begin () const
 Return iterator pointing to the first item in this ESet. More...
 
ESetIterator end () const
 Return iterator pointing to just after the last item in this ESet. More...
 
ESetIterator operator[] (Xapian::termcount i) const
 Return iterator pointing to the i-th object in this ESet. More...
 
ESetIterator back () const
 Return iterator pointing to the last object in this ESet. More...
 
std::string get_description () const
 Return a string describing this object. More...
 

Private Types

typedef Xapian::ESetIterator value_type
 
typedef Xapian::termcount size_type
 
typedef Xapian::termcount_diff difference_type
 
typedef Xapian::ESetIterator iterator
 
typedef Xapian::ESetIterator const_iterator
 
typedef value_typepointer
 
typedef const value_typeconst_pointer
 
typedef value_type reference
 
typedef const value_type const_reference
 

Private Member Functions

Xapian::termcount max_size () const
 

Private Attributes

Xapian::Internal::intrusive_ptr_nonnull< Internalinternal
 

Friends

class ESetIterator
 

Detailed Description

Class representing a list of search results.

Definition at line 42 of file eset.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 130 of file eset.h.

◆ const_pointer

typedef const value_type* Xapian::ESet::const_pointer
private

Definition at line 134 of file eset.h.

◆ const_reference

Definition at line 138 of file eset.h.

◆ difference_type

Definition at line 126 of file eset.h.

◆ iterator

Definition at line 128 of file eset.h.

◆ pointer

Definition at line 132 of file eset.h.

◆ reference

Definition at line 136 of file eset.h.

◆ size_type

Definition at line 124 of file eset.h.

◆ value_type

ESet is what the C++ STL calls a container.

The following typedefs allow the class to be used in templates in the same way the standard containers can be.

These are deliberately hidden from the Doxygen-generated docs, as the machinery here isn't interesting to API users. They just need to know that Xapian container classes are compatible with the STL.

See "The C++ Programming Language", 3rd ed. section 16.3.1:

Definition at line 122 of file eset.h.

Constructor & Destructor Documentation

◆ ESet() [1/3]

Xapian::ESet::ESet ( const ESet o)
default

Copying is allowed.

The internals are reference counted, so copying is cheap.

◆ ESet() [2/3]

Xapian::ESet::ESet ( ESet &&  o)
default

Move constructor.

◆ ESet() [3/3]

Xapian::ESet::ESet ( )

Default constructor.

Creates an empty ESet, mostly useful as a placeholder.

Definition at line 184 of file esetinternal.cc.

◆ ~ESet()

Xapian::ESet::~ESet ( )

Destructor.

Definition at line 196 of file esetinternal.cc.

Member Function Documentation

◆ back()

ESetIterator Xapian::ESet::back ( ) const
inline

Return iterator pointing to the last object in this ESet.

Definition at line 341 of file eset.h.

References ESetIterator.

Referenced by DEFINE_TESTCASE().

◆ begin()

ESetIterator Xapian::ESet::begin ( ) const
inline

Return iterator pointing to the first item in this ESet.

Definition at line 324 of file eset.h.

References ESetIterator, and size().

Referenced by DEFINE_TESTCASE(), and main().

◆ empty()

bool Xapian::ESet::empty ( ) const
inline

Return true if this ESet object is empty.

Definition at line 82 of file eset.h.

◆ end()

ESetIterator Xapian::ESet::end ( ) const
inline

Return iterator pointing to just after the last item in this ESet.

Definition at line 329 of file eset.h.

References ESetIterator.

Referenced by DEFINE_TESTCASE(), and main().

◆ get_description()

std::string Xapian::ESet::get_description ( ) const

Return a string describing this object.

Definition at line 211 of file esetinternal.cc.

Referenced by DEFINE_TESTCASE().

◆ get_ebound()

Xapian::termcount Xapian::ESet::get_ebound ( ) const

Return a bound on the full size of this ESet object.

This is a bound on size() if get_eset() had been called with maxitems set high enough that all results were returned.

Definition at line 205 of file esetinternal.cc.

Referenced by DEFINE_TESTCASE().

◆ max_size()

Xapian::termcount Xapian::ESet::max_size ( ) const
inlineprivate

ESet is what the C++ STL calls a container.

The following methods allow the class to be used in templates in the same way the standard containers can be.

These are deliberately hidden from the Doxygen-generated docs, as the machinery here isn't interesting to API users. They just need to know that Xapian container classes are compatible with the STL.

Definition at line 152 of file eset.h.

◆ operator=() [1/2]

ESet & Xapian::ESet::operator= ( const ESet o)
default

Copying is allowed.

The internals are reference counted, so assignment is cheap.

◆ operator=() [2/2]

ESet & Xapian::ESet::operator= ( ESet &&  o)
default

Move assignment operator.

◆ operator[]()

ESetIterator Xapian::ESet::operator[] ( Xapian::termcount  i) const
inline

Return iterator pointing to the i-th object in this ESet.

Definition at line 336 of file eset.h.

References ESetIterator, and size().

◆ size()

Xapian::termcount Xapian::ESet::size ( ) const

Return number of items in this ESet object.

Definition at line 199 of file esetinternal.cc.

References internal, and Xapian::ESet::Internal::items.

Referenced by begin(), DEFINE_TESTCASE(), Xapian::iterator_rewind(), Xapian::iterator_rewound(), and operator[]().

◆ swap()

void Xapian::ESet::swap ( ESet o)
inline

Efficiently swap this ESet object with another.

Definition at line 92 of file eset.h.

References internal.

Friends And Related Function Documentation

◆ ESetIterator

friend class ESetIterator
friend

Definition at line 43 of file eset.h.

Referenced by back(), begin(), end(), and operator[]().

Member Data Documentation

◆ internal

Xapian::Internal::intrusive_ptr_nonnull<Internal> Xapian::ESet::internal
private

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