|
Blender V4.3
|
#include <BLI_vector_list.hh>
Public Types | |
| using | UsedVector = Vector<T, 0> |
Public Member Functions | |
| VectorList () | |
| void | append (const T &value) |
| void | append (T &&value) |
| template<typename ForwardT > | |
| void | append_as (ForwardT &&value) |
| UsedVector * | begin () |
| UsedVector * | end () |
| const UsedVector * | begin () const |
| const UsedVector * | end () const |
| T & | last () |
| int64_t | size () const |
A VectorList is a vector of vectors.
VectorList can be used when:
1) Don't know up front the number of elements that will be added to the list. Use array or vector.reserve when known up front.
2) Number of reads/writes doesn't require sequential access of the whole list. A vector ensures memory is sequential which is fast when reading, writing can have overhead when the reserved memory is full.
When a VectorList reserved memory is full it will allocate memory for the new items, breaking the sequential access. Within each allocated memory block the elements are ordered sequentially.
Definition at line 29 of file BLI_vector_list.hh.
| using blender::VectorList< T, CapacityStart, CapacitySoftLimit >::UsedVector = Vector<T, 0> |
Definition at line 31 of file BLI_vector_list.hh.
|
inline |
Definition at line 40 of file BLI_vector_list.hh.
|
inline |
Definition at line 45 of file BLI_vector_list.hh.
References blender::VectorList< T, CapacityStart, CapacitySoftLimit >::append_as().
|
inline |
Definition at line 50 of file BLI_vector_list.hh.
References blender::VectorList< T, CapacityStart, CapacitySoftLimit >::append_as().
|
inline |
Definition at line 55 of file BLI_vector_list.hh.
Referenced by blender::VectorList< T, CapacityStart, CapacitySoftLimit >::append(), and blender::VectorList< T, CapacityStart, CapacitySoftLimit >::append().
|
inline |
Definition at line 61 of file BLI_vector_list.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::begin().
|
inline |
Definition at line 71 of file BLI_vector_list.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::begin().
|
inline |
Definition at line 66 of file BLI_vector_list.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::end().
|
inline |
Definition at line 76 of file BLI_vector_list.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::end().
|
inline |
Definition at line 81 of file BLI_vector_list.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::last().
|
inline |
Definition at line 86 of file BLI_vector_list.hh.
References result.