xapian-core
1.4.27
|
Vector of Xapian PIMPL objects. More...
#include <smallvector.h>
Classes | |
class | const_iterator |
Public Types | |
typedef std::size_t | size_type |
Public Member Functions | |
SmallVector () | |
SmallVector (size_type n) | |
~SmallVector () | |
const_iterator | begin () const |
const_iterator | end () const |
size_type | size () const |
size_type | capacity () const |
bool | empty () const |
void | clear () |
void | reserve (size_type n) |
void | push_back (const T &elt) |
T | operator[] (size_type idx) const |
Additional Inherited Members | |
Private Member Functions inherited from Xapian::SmallVector_ | |
SmallVector_ () | |
void | do_reserve (std::size_t n) |
Private Attributes inherited from Xapian::SmallVector_ | |
std::size_t | c |
void * | p [2] |
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 55 of file smallvector.h.
typedef std::size_t Xapian::SmallVector< T >::size_type |
Definition at line 57 of file smallvector.h.
|
inline |
Definition at line 86 of file smallvector.h.
|
inlineexplicit |
Definition at line 89 of file smallvector.h.
|
inline |
Definition at line 93 of file smallvector.h.
|
inline |
Definition at line 97 of file smallvector.h.
|
inline |
Definition at line 114 of file smallvector.h.
|
inline |
Definition at line 122 of file smallvector.h.
|
inline |
Definition at line 118 of file smallvector.h.
|
inline |
Definition at line 103 of file smallvector.h.
|
inline |
Definition at line 158 of file smallvector.h.
|
inline |
Definition at line 140 of file smallvector.h.
|
inline |
Definition at line 133 of file smallvector.h.
|
inline |
Definition at line 109 of file smallvector.h.