|
xapian-core
2.0.0
|
Vector of Xapian PIMPL objects. More...
#include <smallvector.h>
Inheritance diagram for Xapian::SmallVector< T >:
Collaboration diagram for Xapian::SmallVector< T >:Classes | |
| class | const_iterator |
Public Types | |
| typedef std::size_t | size_type |
Public Types inherited from Xapian::SmallVectorI< T::Internal > | |
| typedef std::size_t | size_type |
| typedef T::Internal *const * | const_iterator |
Public Member Functions | |
| SmallVector () | |
| SmallVector (size_type n) | |
| const_iterator | begin () const |
| const_iterator | end () const |
| void | push_back (const T &elt) |
| T | operator[] (size_type idx) const |
| T | front () const |
| T | back () const |
| void | push_back (TI *elt) |
Public Member Functions inherited from Xapian::SmallVectorI< T::Internal > | |
| SmallVectorI () | |
| SmallVectorI (size_type n) | |
| SmallVectorI (SmallVectorI &&o) noexcept | |
| ~SmallVectorI () | |
| const_iterator | begin () const |
| const_iterator | end () const |
| void | clear () |
| void | push_back (T::Internal *elt) |
| T::Internal * | operator[] (size_type idx) const |
| T::Internal * | front () const |
| T::Internal * | back () const |
Public Member Functions inherited from Xapian::SmallVector_ | |
| SmallVector_ () | |
| SmallVector_ (const SmallVector_ &)=delete | |
| void | operator= (const SmallVector_ &)=delete |
| SmallVector_ (SmallVector_ &&o) noexcept | |
| SmallVector_ (std::size_t n) | |
| std::size_t | size () const |
| std::size_t | capacity () const |
| bool | empty () const |
| void | reserve (std::size_t n) |
Private Types | |
| typedef SmallVectorI< typename T::Internal > | super |
Additional Inherited Members | |
Protected Member Functions inherited from Xapian::SmallVector_ | |
| void | do_free () |
| void | do_reserve (std::size_t n) |
| void | do_clear () |
| bool | is_external () const |
| Return true if storage is external to the object. More... | |
| void *const * | do_begin () const |
| void *const * | do_end () const |
| void | do_push_back (void *elt) |
Vector of Xapian PIMPL objects.
A notable feature is that if the vector holds <= 2 objects, there's no extra storage - the two internal pointers are held in the two pointers which otherwise point to the first and just after the last element.
This means that for the fairly common cases of pair-wise Query operators and Database objects with one or two subdatabases, we use less space than std::vector<Xapian::Foo> would.
Definition at line 578 of file smallvector.h.
| typedef std::size_t Xapian::SmallVector< T >::size_type |
Definition at line 582 of file smallvector.h.
|
private |
Definition at line 579 of file smallvector.h.
|
inline |
Definition at line 617 of file smallvector.h.
|
inlineexplicit |
Definition at line 620 of file smallvector.h.
|
inline |
Definition at line 644 of file smallvector.h.
References Xapian::SmallVector< T >::end().
|
inline |
Definition at line 622 of file smallvector.h.
References Xapian::SmallVectorI< TI >::begin().
Referenced by Xapian::Internal::QueryBranch::do_bool_or_like(), Xapian::Internal::QueryBranch::do_or_like(), Xapian::SmallVector< T >::front(), Xapian::Internal::QueryBranch::gather_terms(), Xapian::Internal::QueryBranch::get_description_helper(), Xapian::Internal::QueryBranch::get_length(), Xapian::SmallVector< T >::operator[](), Xapian::Internal::QueryAndLike::postlist_sub_and_like(), Xapian::Internal::QueryFilter::postlist_sub_and_like(), Xapian::Internal::QueryXor::postlist_sub_xor(), Xapian::Internal::QueryWindowed::postlist_windowed(), and Xapian::Internal::QueryBranch::serialise_().
|
inline |
Definition at line 626 of file smallvector.h.
References Xapian::SmallVectorI< TI >::end().
Referenced by Xapian::SmallVector< T >::back(), Xapian::Internal::QueryBranch::do_bool_or_like(), Xapian::Internal::QueryBranch::do_or_like(), Xapian::Internal::QueryBranch::gather_terms(), Xapian::Internal::QueryBranch::get_description_helper(), Xapian::Internal::QueryBranch::get_length(), Xapian::Internal::QueryAndLike::postlist_sub_and_like(), Xapian::Internal::QueryFilter::postlist_sub_and_like(), Xapian::Internal::QueryXor::postlist_sub_xor(), Xapian::Internal::QueryWindowed::postlist_windowed(), and Xapian::Internal::QueryBranch::serialise_().
|
inline |
Definition at line 640 of file smallvector.h.
References Xapian::SmallVector< T >::begin().
|
inline |
Definition at line 636 of file smallvector.h.
References Xapian::SmallVector< T >::begin().
|
inline |
Definition at line 632 of file smallvector.h.
References Xapian::SmallVector< T >::push_back().
Referenced by Xapian::Internal::QueryAndLike::add_subquery(), Xapian::Internal::QueryOrLike::add_subquery(), Xapian::Internal::QueryAndNot::add_subquery(), and Xapian::Internal::QueryAndMaybe::add_subquery().
|
inline |
Definition at line 545 of file smallvector.h.
Referenced by Xapian::SmallVector< T >::push_back().