WPILibC++ 2023.4.3
|
Vector which provides an integrated freelist for removal and reuse of individual elements. More...
#include <wpi/UidVector.h>
Public Types | |
using | value_type = T |
using | pointer = T * |
using | const_pointer = const T * |
using | reference = T & |
using | const_reference = const T & |
using | size_type = typename std::vector< T >::size_type |
using | difference_type = typename std::vector< T >::difference_type |
using | iterator = impl::UidVectorIterator< typename std::vector< T >::iterator > |
using | const_iterator = impl::UidVectorIterator< typename std::vector< T >::const_iterator > |
Public Member Functions | |
bool | empty () const noexcept |
size_type | size () const noexcept |
T & | operator[] (size_type i) |
const T & | operator[] (size_type i) const |
template<class... Args> | |
size_type | emplace_back (Args &&... args) |
T | erase (size_type uid) |
Removes the identified element by replacing it with a default-constructed one. More... | |
void | clear () noexcept |
Removes all elements. More... | |
iterator | begin () noexcept |
const_iterator | begin () const noexcept |
const_iterator | cbegin () const noexcept |
iterator | end () noexcept |
const_iterator | end () const noexcept |
const_iterator | cend () const noexcept |
Vector which provides an integrated freelist for removal and reuse of individual elements.
T | element type; must be default-constructible and evaluate in boolean context to false when "empty" |
reuse_threshold | how many free elements to store up before starting to recycle them |
using wpi::UidVector< T, reuse_threshold >::const_iterator = impl::UidVectorIterator<typename std::vector<T>::const_iterator> |
using wpi::UidVector< T, reuse_threshold >::const_pointer = const T* |
using wpi::UidVector< T, reuse_threshold >::const_reference = const T& |
using wpi::UidVector< T, reuse_threshold >::difference_type = typename std::vector<T>::difference_type |
using wpi::UidVector< T, reuse_threshold >::iterator = impl::UidVectorIterator<typename std::vector<T>::iterator> |
using wpi::UidVector< T, reuse_threshold >::pointer = T* |
using wpi::UidVector< T, reuse_threshold >::reference = T& |
using wpi::UidVector< T, reuse_threshold >::size_type = typename std::vector<T>::size_type |
using wpi::UidVector< T, reuse_threshold >::value_type = T |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Removes all elements.
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
Removes the identified element by replacing it with a default-constructed one.
The element is added to the freelist for later reuse.
|
inline |
|
inline |
|
inlinenoexcept |