Blender V4.3
blender::VArrayImpl_For_Single< T > Class Template Referencefinal

#include <BLI_virtual_array.hh>

Inherits blender::VArrayImpl< T >.

Public Member Functions

 VArrayImpl_For_Single (T value, const int64_t size)
 
- Public Member Functions inherited from blender::VArrayImpl< T >
 VArrayImpl (const int64_t size)
 
virtual ~VArrayImpl ()=default
 
int64_t size () const
 
virtual bool try_assign_GVArray (GVArray &) const
 

Protected Member Functions

T get (const int64_t) const override
 
CommonVArrayInfo common_info () 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
 

Additional Inherited Members

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

Detailed Description

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

A virtual array implementation that returns the same value for every index. This class is final so that it can be devirtualized by the compiler in some cases (e.g. when devirtualize_varray is used).

Definition at line 296 of file BLI_virtual_array.hh.

Constructor & Destructor Documentation

◆ VArrayImpl_For_Single()

template<typename T >
blender::VArrayImpl_For_Single< T >::VArrayImpl_For_Single ( T value,
const int64_t size )
inline

Definition at line 301 of file BLI_virtual_array.hh.

Member Function Documentation

◆ common_info()

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

Reimplemented from blender::VArrayImpl< T >.

Definition at line 312 of file BLI_virtual_array.hh.

References blender::CommonVArrayInfo::Single.

◆ get()

template<typename T >
T blender::VArrayImpl_For_Single< 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 307 of file BLI_virtual_array.hh.

◆ materialize()

template<typename T >
void blender::VArrayImpl_For_Single< 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 317 of file BLI_virtual_array.hh.

◆ materialize_compressed()

template<typename T >
void blender::VArrayImpl_For_Single< 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 327 of file BLI_virtual_array.hh.

References blender::initialized_fill_n().

◆ materialize_compressed_to_uninitialized()

template<typename T >
void blender::VArrayImpl_For_Single< 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 332 of file BLI_virtual_array.hh.

References blender::uninitialized_fill_n().

◆ materialize_to_uninitialized()

template<typename T >
void blender::VArrayImpl_For_Single< 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 322 of file BLI_virtual_array.hh.

References T.


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