Blender V4.5
blender::VArrayImpl_For_GVArray< T > Class Template Reference

#include <BLI_generic_virtual_array.hh>

Inherits blender::VArrayImpl< T >.

Public Member Functions

 VArrayImpl_For_GVArray (GVArray varray)
 
- Public Member Functions inherited from blender::VArrayImpl< T >
 VArrayImpl (const int64_t size)
 
virtual ~VArrayImpl ()=default
 
int64_t size () const
 

Protected Member Functions

T get (const int64_t index) const override
 
CommonVArrayInfo common_info () const override
 
bool try_assign_GVArray (GVArray &varray) const override
 
void materialize (const IndexMask &mask, T *dst) const override
 
void materialize_to_uninitialized (const IndexMask &mask, T *dst) const override
 
void materialize_compressed (const IndexMask &mask, T *dst) const override
 
void materialize_compressed_to_uninitialized (const IndexMask &mask, T *dst) const override
 

Protected Attributes

GVArray varray_
 
- Protected Attributes inherited from blender::VArrayImpl< T >
int64_t size_
 

Detailed Description

template<typename T>
class blender::VArrayImpl_For_GVArray< T >

Definition at line 361 of file BLI_generic_virtual_array.hh.

Constructor & Destructor Documentation

◆ VArrayImpl_For_GVArray()

template<typename T >
blender::VArrayImpl_For_GVArray< T >::VArrayImpl_For_GVArray ( GVArray varray)
inline

Definition at line 366 of file BLI_generic_virtual_array.hh.

References BLI_assert, and blender::GVArrayCommon::type().

Member Function Documentation

◆ common_info()

template<typename T >
CommonVArrayInfo blender::VArrayImpl_For_GVArray< T >::common_info ( ) const
inlineoverrideprotectedvirtual

Reimplemented from blender::VArrayImpl< T >.

Definition at line 380 of file BLI_generic_virtual_array.hh.

References blender::GVArrayCommon::common_info().

◆ get()

template<typename T >
T blender::VArrayImpl_For_GVArray< T >::get ( const int64_t index) const
inlineoverrideprotectedvirtual

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 373 of file BLI_generic_virtual_array.hh.

References blender::GVArrayCommon::get(), and value.

◆ materialize()

template<typename T >
void blender::VArrayImpl_For_GVArray< T >::materialize ( const IndexMask & mask,
T * dst ) const
inlineoverrideprotectedvirtual

Copy values from the virtual array into the provided span. The index of the value in the virtual array is the same as the index in the span.

Reimplemented from blender::VArrayImpl< T >.

Definition at line 391 of file BLI_generic_virtual_array.hh.

References mask(), and blender::GVArrayCommon::materialize().

◆ materialize_compressed()

template<typename T >
void blender::VArrayImpl_For_GVArray< T >::materialize_compressed ( const IndexMask & mask,
T * dst ) const
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 401 of file BLI_generic_virtual_array.hh.

References mask(), and blender::GVArrayCommon::materialize_compressed().

◆ materialize_compressed_to_uninitialized()

template<typename T >
void blender::VArrayImpl_For_GVArray< T >::materialize_compressed_to_uninitialized ( const IndexMask & mask,
T * dst ) const
inlineoverrideprotectedvirtual

Same as materialize_compressed but #r_span is expected to be uninitialized.

Reimplemented from blender::VArrayImpl< T >.

Definition at line 406 of file BLI_generic_virtual_array.hh.

References mask(), and blender::GVArrayCommon::materialize_compressed_to_uninitialized().

◆ materialize_to_uninitialized()

template<typename T >
void blender::VArrayImpl_For_GVArray< T >::materialize_to_uninitialized ( const IndexMask & mask,
T * dst ) const
inlineoverrideprotectedvirtual

Same as materialize but #r_span is expected to be uninitialized.

Reimplemented from blender::VArrayImpl< T >.

Definition at line 396 of file BLI_generic_virtual_array.hh.

References mask(), and blender::GVArrayCommon::materialize_to_uninitialized().

◆ try_assign_GVArray()

template<typename T >
bool blender::VArrayImpl_For_GVArray< T >::try_assign_GVArray ( GVArray & ) const
inlineoverrideprotectedvirtual

If this virtual wraps another #GVArray, this method should assign the wrapped array to the provided reference. This allows losslessly converting between generic and typed virtual arrays in all cases. Return true when the virtual array was assigned and false when nothing was done.

Reimplemented from blender::VArrayImpl< T >.

Definition at line 385 of file BLI_generic_virtual_array.hh.

Member Data Documentation

◆ varray_

template<typename T >
GVArray blender::VArrayImpl_For_GVArray< T >::varray_
protected

Definition at line 363 of file BLI_generic_virtual_array.hh.


The documentation for this class was generated from the following file: