Blender  V2.93
Public Member Functions | Protected Member Functions | List of all members
blender::VArrayForSingle< T > Class Template Referencefinal

#include <BLI_virtual_array.hh>

Inherits blender::VArray< T >.

Public Member Functions

 VArrayForSingle (T value, const int64_t size)
 
- Public Member Functions inherited from blender::VArray< T >
 VArray (const int64_t size)
 
virtual ~VArray ()=default
 
T get (const int64_t index) const
 
int64_t size () const
 
bool is_empty () const
 
bool is_span () const
 
Span< Tget_span () const
 
bool is_single () const
 
T get_single () const
 
T operator[] (const int64_t index) const
 

Protected Member Functions

T get_impl (const int64_t UNUSED(index)) const override
 
bool is_span_impl () const override
 
Span< Tget_span_impl () const override
 
bool is_single_impl () const override
 
T get_single_impl () const override
 
- Protected Member Functions inherited from blender::VArray< T >
virtual T get_impl (const int64_t index) const =0
 

Additional Inherited Members

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

Detailed Description

template<typename T>
class blender::VArrayForSingle< 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 182 of file BLI_virtual_array.hh.

Constructor & Destructor Documentation

◆ VArrayForSingle()

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

Definition at line 187 of file BLI_virtual_array.hh.

Member Function Documentation

◆ get_impl()

template<typename T >
T blender::VArrayForSingle< T >::get_impl ( const int64_t   UNUSEDindex) const
inlineoverrideprotected

Definition at line 192 of file BLI_virtual_array.hh.

◆ get_single_impl()

template<typename T >
T blender::VArrayForSingle< T >::get_single_impl ( ) const
inlineoverrideprotectedvirtual

Reimplemented from blender::VArray< T >.

Definition at line 212 of file BLI_virtual_array.hh.

◆ get_span_impl()

template<typename T >
Span<T> blender::VArrayForSingle< T >::get_span_impl ( ) const
inlineoverrideprotectedvirtual

Reimplemented from blender::VArray< T >.

Definition at line 202 of file BLI_virtual_array.hh.

◆ is_single_impl()

template<typename T >
bool blender::VArrayForSingle< T >::is_single_impl ( ) const
inlineoverrideprotectedvirtual

Reimplemented from blender::VArray< T >.

Definition at line 207 of file BLI_virtual_array.hh.

◆ is_span_impl()

template<typename T >
bool blender::VArrayForSingle< T >::is_span_impl ( ) const
inlineoverrideprotectedvirtual

Reimplemented from blender::VArray< T >.

Definition at line 197 of file BLI_virtual_array.hh.

References blender::VArray< T >::size_.


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