|
Blender V5.0
|
#include <BLI_virtual_array.hh>
Inherits blender::Span< T >.
Public Member Functions | |
| VArraySpan ()=default | |
| VArraySpan (const VArray< T > &varray) | |
| VArraySpan (VArray< T > &&varray) | |
| VArraySpan (VArraySpan &&other) | |
| VArraySpan & | operator= (VArraySpan &&other) |
| Public Member Functions inherited from blender::Span< T > | |
| constexpr | Span ()=default |
| constexpr | Span (const T *start, int64_t size) |
| template<typename U, BLI_ENABLE_IF((is_span_convertible_pointer_v< U, T >))> | |
| constexpr | Span (const U *start, int64_t size) |
| constexpr | Span (const std::initializer_list< T > &list) |
| constexpr | Span (const std::vector< T > &vector) |
| template<std::size_t N> | |
| constexpr | Span (const std::array< T, N > &array) |
| template<typename U, BLI_ENABLE_IF((is_span_convertible_pointer_v< U, T >))> | |
| constexpr | Span (Span< U > span) |
| constexpr Span | slice (int64_t start, int64_t size) const |
| constexpr Span | slice (IndexRange range) const |
| constexpr Span | slice_safe (const int64_t start, const int64_t size) const |
| constexpr Span | slice_safe (IndexRange range) const |
| constexpr Span | drop_front (int64_t n) const |
| constexpr Span | drop_back (int64_t n) const |
| constexpr Span | take_front (int64_t n) const |
| constexpr Span | take_back (int64_t n) const |
| constexpr const T * | data () const |
| constexpr const T * | begin () const |
| constexpr const T * | end () const |
| constexpr std::reverse_iterator< const T * > | rbegin () const |
| constexpr std::reverse_iterator< const T * > | rend () const |
| constexpr const T & | operator[] (int64_t index) const |
| constexpr int64_t | size () const |
| constexpr bool | is_empty () const |
| constexpr int64_t | size_in_bytes () const |
| constexpr bool | contains (const T &value) const |
| constexpr bool | contains_ptr (const T *ptr) const |
| constexpr int64_t | count (const T &value) const |
| constexpr const T & | first () const |
| constexpr const T & | last (const int64_t n=0) const |
| constexpr bool | has_duplicates__linear_search () const |
| constexpr bool | intersects__linear_search (Span other) const |
| constexpr int64_t | first_index (const T &search_value) const |
| constexpr int64_t | first_index_try (const T &search_value) const |
| constexpr IndexRange | index_range () const |
| constexpr uint64_t | hash () const |
| template<typename NewT> | |
| Span< NewT > constexpr | cast () const |
Additional Inherited Members | |
| Public Types inherited from blender::Span< T > | |
| using | value_type = T |
| using | pointer = T * |
| using | const_pointer = const T * |
| using | reference = T & |
| using | const_reference = const T & |
| using | iterator = const T * |
| using | size_type = int64_t |
| Protected Attributes inherited from blender::Span< T > | |
| const T * | data_ = nullptr |
| int64_t | size_ = 0 |
In many cases a virtual array is a span internally. In those cases, access to individual could be much more efficient than calling a virtual method. When the underlying virtual array is not a span, this class allocates a new array and copies the values over.
This should be used in those cases:
Definition at line 1108 of file BLI_virtual_array.hh.
|
default |
Referenced by operator=(), VArraySpan(), and VArraySpan().
|
inline |
Definition at line 1116 of file BLI_virtual_array.hh.
References T, and VArraySpan().
|
inline |
Definition at line 1118 of file BLI_virtual_array.hh.
References blender::CommonVArrayInfo::data, blender::Span< T >::size_, blender::CommonVArrayInfo::Span, blender::Span< T >::Span(), T, and blender::CommonVArrayInfo::type.
|
inline |
Definition at line 1136 of file BLI_virtual_array.hh.
References blender::Span< T >::size_, blender::CommonVArrayInfo::Span, blender::CommonVArrayInfo::type, and VArraySpan().
|
inline |
Definition at line 1154 of file BLI_virtual_array.hh.
References VArraySpan().