Blender
V3.3
|
#include <BLI_virtual_array.hh>
Public Member Functions | |
VArraySpan ()=default | |
VArraySpan (VArray< T > varray) | |
VArraySpan (VArraySpan &&other) | |
VArraySpan & | operator= (VArraySpan &&other) |
![]() | |
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 | 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 T | get (int64_t index, const T &fallback) 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 |
template<typename NewT > | |
constexpr Span< NewT > | cast () const |
template<typename PrintLineF > | |
void | print_as_lines (std::string name, PrintLineF print_line) const |
void | print_as_lines (std::string name) const |
Additional Inherited Members | |
![]() | |
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 |
![]() | |
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 1123 of file BLI_virtual_array.hh.
|
default |
Referenced by blender::VArraySpan< T >::operator=().
|
inline |
Definition at line 1131 of file BLI_virtual_array.hh.
References blender::VArrayCommon< T >::common_info(), blender::Array< T, InlineBufferCapacity, Allocator >::data(), blender::CommonVArrayInfo::data, blender::VArrayCommon< T >::materialize_to_uninitialized(), blender::VArrayCommon< T >::size(), blender::CommonVArrayInfo::Span, T, blender::CommonVArrayInfo::type, and blender::Array< T, InlineBufferCapacity, Allocator >::~Array().
|
inline |
Definition at line 1149 of file BLI_virtual_array.hh.
References blender::VArrayCommon< T >::common_info(), blender::Array< T, InlineBufferCapacity, Allocator >::data(), blender::CommonVArrayInfo::data, blender::VArrayCommon< T >::size(), blender::CommonVArrayInfo::Span, T, and blender::CommonVArrayInfo::type.
|
inline |
Definition at line 1167 of file BLI_virtual_array.hh.
References blender::VArraySpan< T >::VArraySpan().