|
RADLib
RADical C++ application framework
|
Vector with InlineN elements of inline storage before heap allocation. More...
#include <RADDataStructures.h>
Public Types | |
| using | iterator = T * |
| Mutable contiguous iterator. More... | |
| using | const_iterator = const T * |
| Const contiguous iterator. More... | |
Public Member Functions | |
| RADSmallVector () | |
| Creates an empty small vector using inline storage. More... | |
| RADSmallVector (std::initializer_list< T > values) | |
| Creates a small vector from initializer-list values. More... | |
| RADSmallVector (const RADSmallVector &other) | |
| Copies another small vector. More... | |
| RADSmallVector (RADSmallVector &&other) noexcept | |
| Moves another small vector. More... | |
| RADSmallVector & | operator= (const RADSmallVector &other) |
| Replaces this vector with a copy of other. More... | |
| RADSmallVector & | operator= (RADSmallVector &&other) noexcept |
| Replaces this vector by moving from other. More... | |
| ~RADSmallVector () | |
| Destroys elements and heap storage, if allocated. More... | |
| iterator | begin () noexcept |
| Returns iterator to first element. More... | |
| const_iterator | begin () const noexcept |
| Returns const iterator to first element. More... | |
| iterator | end () noexcept |
| Returns iterator one past the last element. More... | |
| const_iterator | end () const noexcept |
| Returns const iterator one past the last element. More... | |
| bool | empty () const noexcept |
| Returns true when no elements are stored. More... | |
| size_t | size () const noexcept |
| Returns number of elements. More... | |
| size_t | capacity () const noexcept |
| Returns current capacity, including inline capacity. More... | |
| bool | usingInlineStorage () const noexcept |
| Returns true while storage is still inline. More... | |
| T * | data () noexcept |
| Returns mutable contiguous storage pointer. More... | |
| const T * | data () const noexcept |
| Returns const contiguous storage pointer. More... | |
| T & | operator[] (size_t index) noexcept |
| Returns element at index without bounds checking. More... | |
| const T & | operator[] (size_t index) const noexcept |
| Returns const element at index without bounds checking. More... | |
| T & | back () noexcept |
| Returns last element; vector must not be empty. More... | |
| const T & | back () const noexcept |
| Returns last element; vector must not be empty. More... | |
| void | reserve (size_t newCapacity) |
| Ensures capacity is at least newCapacity. More... | |
| template<typename... Args> | |
| T & | emplace_back (Args &&... args) |
| Constructs an element at the end and returns it. More... | |
| void | push_back (const T &value) |
| Appends a copy of value. More... | |
| void | push_back (T &&value) |
| Appends value by move. More... | |
| void | pop_back () |
| Removes the last element when present. More... | |
| void | clear () noexcept |
| Destroys all elements while keeping current storage. More... | |
Vector with InlineN elements of inline storage before heap allocation.
| using RADData::RADSmallVector< T, InlineN, Alloc >::const_iterator = const T* |
Const contiguous iterator.
| using RADData::RADSmallVector< T, InlineN, Alloc >::iterator = T* |
Mutable contiguous iterator.
|
inline |
Creates an empty small vector using inline storage.
|
inline |
Creates a small vector from initializer-list values.
|
inline |
Copies another small vector.
|
inlinenoexcept |
Moves another small vector.
|
inline |
Destroys elements and heap storage, if allocated.
|
inlinenoexcept |
Returns last element; vector must not be empty.
|
inlinenoexcept |
Returns last element; vector must not be empty.
|
inlinenoexcept |
Returns const iterator to first element.
|
inlinenoexcept |
Returns iterator to first element.
|
inlinenoexcept |
Returns current capacity, including inline capacity.
|
inlinenoexcept |
Destroys all elements while keeping current storage.
|
inlinenoexcept |
Returns const contiguous storage pointer.
|
inlinenoexcept |
Returns mutable contiguous storage pointer.
|
inline |
Constructs an element at the end and returns it.
|
inlinenoexcept |
Returns true when no elements are stored.
|
inlinenoexcept |
Returns const iterator one past the last element.
|
inlinenoexcept |
Returns iterator one past the last element.
|
inline |
Replaces this vector with a copy of other.
|
inlinenoexcept |
Replaces this vector by moving from other.
|
inlinenoexcept |
Returns const element at index without bounds checking.
|
inlinenoexcept |
Returns element at index without bounds checking.
|
inline |
Removes the last element when present.
|
inline |
Appends a copy of value.
|
inline |
Appends value by move.
|
inline |
Ensures capacity is at least newCapacity.
|
inlinenoexcept |
Returns number of elements.
|
inlinenoexcept |
Returns true while storage is still inline.