Blender
V3.3
|
#include <BLI_virtual_array.hh>
Public Member Functions | |
VArrayImpl_For_Span (const MutableSpan< T > data) | |
![]() | |
virtual void | set_all (Span< T > src) |
virtual bool | try_assign_GVMutableArray (GVMutableArray &UNUSED(varray)) const |
![]() | |
VArrayImpl (const int64_t size) | |
virtual | ~VArrayImpl ()=default |
int64_t | size () const |
virtual void | materialize (IndexMask mask, MutableSpan< T > r_span) const |
virtual void | materialize_to_uninitialized (IndexMask mask, MutableSpan< T > r_span) const |
virtual bool | try_assign_GVArray (GVArray &UNUSED(varray)) const |
virtual bool | is_same (const VArrayImpl< T > &UNUSED(other)) const |
Protected Member Functions | |
VArrayImpl_For_Span (const int64_t size) | |
T | get (const int64_t index) const final |
void | set (const int64_t index, T value) final |
CommonVArrayInfo | common_info () const override |
bool | is_same (const VArrayImpl< T > &other) const final |
void | materialize_compressed (IndexMask mask, MutableSpan< T > r_span) const override |
void | materialize_compressed_to_uninitialized (IndexMask mask, MutableSpan< T > r_span) const override |
Protected Attributes | |
T * | data_ = nullptr |
![]() | |
int64_t | size_ |
A virtual array implementation that references that wraps a span. This implementation is used by mutable and immutable spans to avoid code duplication.
Definition at line 247 of file BLI_virtual_array.hh.
|
inline |
Definition at line 252 of file BLI_virtual_array.hh.
|
inlineprotected |
Definition at line 258 of file BLI_virtual_array.hh.
|
inlineoverrideprotectedvirtual |
Reimplemented from blender::VArrayImpl< T >.
Definition at line 272 of file BLI_virtual_array.hh.
References blender::VArrayImpl_For_Span< T >::data_, and blender::CommonVArrayInfo::Span.
|
inlinefinalprotectedvirtual |
Get the element at #index. This does not return a reference, because the value may be computed on the fly.
Implements blender::VArrayImpl< T >.
Definition at line 262 of file BLI_virtual_array.hh.
References blender::VArrayImpl_For_Span< T >::data_.
|
inlinefinalprotected |
Definition at line 277 of file BLI_virtual_array.hh.
References blender::CommonVArrayInfo::data, blender::VArrayImpl_For_Span< T >::data_, blender::CommonVArrayInfo::Span, T, and blender::CommonVArrayInfo::type.
|
inlineoverrideprotectedvirtual |
Copy values from the virtual array into the provided span. Contrary to materialize, the index in virtual array is not the same as the index in the output span. Instead, the span is filled without gaps.
Reimplemented from blender::VArrayImpl< T >.
Definition at line 289 of file BLI_virtual_array.hh.
References mask().
|
inlineoverrideprotectedvirtual |
Same as materialize_compressed but #r_span is expected to be uninitialized.
Reimplemented from blender::VArrayImpl< T >.
Definition at line 298 of file BLI_virtual_array.hh.
References blender::MutableSpan< T >::data(), mask(), and T.
|
inlinefinalprotectedvirtual |
Assign the provided #value to the #index.
Implements blender::VMutableArrayImpl< T >.
Definition at line 267 of file BLI_virtual_array.hh.
References blender::VArrayImpl_For_Span< T >::data_.
|
protected |
Definition at line 249 of file BLI_virtual_array.hh.
Referenced by blender::VArrayImpl_For_Span< T >::common_info(), blender::VArrayImpl_For_Span< T >::get(), blender::VArrayImpl_For_Span< T >::is_same(), and blender::VArrayImpl_For_Span< T >::set().