Blender  V3.3
Public Member Functions | List of all members
blender::GVArray Class Reference

#include <BLI_generic_virtual_array.hh>

Inheritance diagram for blender::GVArray:
blender::GVArrayCommon

Public Member Functions

 GVArray ()=default
 
const GVArrayImplget_implementation () const
 
- Public Member Functions inherited from blender::GVArrayCommon
bool may_have_ownership () const
 
IndexRange index_range () const
 
void materialize (void *dst) const
 
void materialize (const IndexMask mask, void *dst) const
 
void materialize_to_uninitialized (void *dst) const
 
void materialize_to_uninitialized (const IndexMask mask, void *dst) const
 
void materialize_compressed (IndexMask mask, void *dst) const
 
void materialize_compressed_to_uninitialized (IndexMask mask, void *dst) const
 
bool is_span () const
 
GSpan get_internal_span () const
 
bool is_single () const
 
void get_internal_single (void *r_value) const
 
void get_internal_single_to_uninitialized (void *r_value) const
 
const CPPTypetype () const
 
 operator bool () const
 
int64_t size () const
 
bool is_empty () const
 
template<typename T >
bool try_assign_VArray (VArray< T > &varray) const
 
CommonVArrayInfo common_info () const
 
void get (int64_t index, void *r_value) const
 
template<typename T >
T get (int64_t index) const
 
void get_to_uninitialized (int64_t index, void *r_value) const
 

#GVArray

 GVArray (const GVArray &other)
 
 GVArray (GVArray &&other) noexcept
 
 GVArray (const GVArrayImpl *impl)
 
 GVArray (std::shared_ptr< const GVArrayImpl > impl)
 
 GVArray (varray_tag::single, const CPPType &type, int64_t size, const void *value)
 
GVArray slice (IndexRange slice) const
 
GVArrayoperator= (const GVArray &other)
 
GVArrayoperator= (GVArray &&other) noexcept
 
static GVArray ForSingle (const CPPType &type, int64_t size, const void *value)
 
static GVArray ForSingleRef (const CPPType &type, int64_t size, const void *value)
 
static GVArray ForSingleDefault (const CPPType &type, int64_t size)
 
static GVArray ForSpan (GSpan span)
 
static GVArray ForGArray (GArray<> array)
 
static GVArray ForEmpty (const CPPType &type)
 

Inline methods for #GVArray.

 GVArray (varray_tag::span, GSpan span)
 
 GVArray (varray_tag::single_ref, const CPPType &type, int64_t size, const void *value)
 
template<typename T >
 GVArray (const VArray< T > &varray)
 
template<typename T >
VArray< Ttyped () const
 
template<typename ImplT , typename... Args>
static GVArray For (Args &&...args)
 

Additional Inherited Members

- Protected Types inherited from blender::GVArrayCommon
using Storage = Any< detail::GVArrayAnyExtraInfo, 40, 8 >
 
- Protected Member Functions inherited from blender::GVArrayCommon
 GVArrayCommon ()=default
 
 GVArrayCommon (const GVArrayCommon &other)
 
 GVArrayCommon (GVArrayCommon &&other) noexcept
 
 GVArrayCommon (const GVArrayImpl *impl)
 
 GVArrayCommon (std::shared_ptr< const GVArrayImpl > impl)
 
 ~GVArrayCommon ()
 
void copy_from (const GVArrayCommon &other)
 
void move_from (GVArrayCommon &&other) noexcept
 
const GVArrayImplimpl_from_storage () const
 
template<typename ImplT , typename... Args>
void emplace (Args &&...args)
 
- Protected Attributes inherited from blender::GVArrayCommon
const GVArrayImplimpl_ = nullptr
 
Storage storage_
 

Detailed Description

Generic version of #VArray.

Definition at line 176 of file BLI_generic_virtual_array.hh.

Constructor & Destructor Documentation

◆ GVArray() [1/9]

blender::GVArray::GVArray ( )
default

Referenced by ForSingle(), ForSingleRef(), and ForSpan().

◆ GVArray() [2/9]

blender::GVArray::GVArray ( const GVArray other)
default

◆ GVArray() [3/9]

blender::GVArray::GVArray ( GVArray &&  other)
defaultnoexcept

◆ GVArray() [4/9]

blender::GVArray::GVArray ( const GVArrayImpl impl)

Definition at line 653 of file generic_virtual_array.cc.

◆ GVArray() [5/9]

blender::GVArray::GVArray ( std::shared_ptr< const GVArrayImpl impl)

Definition at line 657 of file generic_virtual_array.cc.

◆ GVArray() [6/9]

blender::GVArray::GVArray ( varray_tag::span  ,
GSpan  span 
)
inline

◆ GVArray() [7/9]

blender::GVArray::GVArray ( varray_tag::single_ref  ,
const CPPType type,
int64_t  size,
const void value 
)
inline

◆ GVArray() [8/9]

blender::GVArray::GVArray ( varray_tag::single  ,
const CPPType type,
int64_t  size,
const void value 
)

◆ GVArray() [9/9]

template<typename T >
blender::GVArray::GVArray ( const VArray< T > &  varray)
inline

Member Function Documentation

◆ For()

template<typename ImplT , typename... Args>
GVArray blender::GVArray::For ( Args &&...  args)
inlinestatic

Definition at line 841 of file BLI_generic_virtual_array.hh.

◆ ForEmpty()

GVArray blender::GVArray::ForEmpty ( const CPPType type)
static

Definition at line 710 of file generic_virtual_array.cc.

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

Referenced by blender::fn::evaluate_fields().

◆ ForGArray()

GVArray blender::GVArray::ForGArray ( GArray<>  array)
static

◆ ForSingle()

GVArray blender::GVArray::ForSingle ( const CPPType type,
int64_t  size,
const void value 
)
static

◆ ForSingleDefault()

GVArray blender::GVArray::ForSingleDefault ( const CPPType type,
int64_t  size 
)
static

◆ ForSingleRef()

GVArray blender::GVArray::ForSingleRef ( const CPPType type,
int64_t  size,
const void value 
)
static

◆ ForSpan()

GVArray blender::GVArray::ForSpan ( GSpan  span)
static

◆ get_implementation()

const GVArrayImpl* blender::GVArray::get_implementation ( ) const
inline

Definition at line 209 of file BLI_generic_virtual_array.hh.

References blender::GVArrayCommon::impl_.

◆ operator=() [1/2]

GVArray & blender::GVArray::operator= ( const GVArray other)

Definition at line 729 of file generic_virtual_array.cc.

References blender::GVArrayCommon::copy_from().

◆ operator=() [2/2]

GVArray & blender::GVArray::operator= ( GVArray &&  other)
noexcept

Definition at line 735 of file generic_virtual_array.cc.

◆ slice()

GVArray blender::GVArray::slice ( IndexRange  slice) const

◆ typed()

template<typename T >
VArray< T > blender::GVArray::typed
inline

Definition at line 871 of file BLI_generic_virtual_array.hh.

References BLI_assert, blender::GVArrayCommon::common_info(), blender::CommonVArrayInfo::data, blender::VArray< T >::ForSingle(), blender::VArray< T >::ForSpan(), blender::GVArrayCommon::impl_, blender::CPPType::is(), blender::CommonVArrayInfo::may_have_ownership, blender::CommonVArrayInfo::Single, blender::CommonVArrayInfo::Span, T, blender::GVArrayCommon::try_assign_VArray(), blender::GVArrayImpl::type(), and blender::CommonVArrayInfo::type.

Referenced by blender::bke::AttributeAccessor::adapt_domain(), blender::bke::CurvesGeometry::adapt_domain(), blender::ed::spreadsheet::apply_row_filter(), blender::nodes::node_geo_transfer_attribute_cc::NearestTransferFunction::call(), blender::nodes::node_geo_transfer_attribute_cc::IndexTransferFunction::call(), blender::nodes::node_geo_duplicate_elements_cc::copy_attributes_without_id(), blender::nodes::node_geo_duplicate_elements_cc::copy_curve_attributes_without_id(), blender::nodes::node_geo_duplicate_elements_cc::copy_edge_attributes_without_id(), blender::nodes::node_geo_duplicate_elements_cc::copy_face_attributes_without_id(), blender::nodes::node_geo_duplicate_elements_cc::copy_stable_id_curves(), blender::nodes::node_geo_duplicate_elements_cc::copy_stable_id_edges(), blender::nodes::node_geo_duplicate_elements_cc::copy_stable_id_faces(), blender::nodes::node_geo_duplicate_elements_cc::copy_stable_id_point(), blender::fn::FieldEvaluator::get_evaluated(), blender::fn::FieldEvaluator::get_evaluated_as_mask(), blender::bke::CustomDataAttributes::get_for_read(), blender::nodes::node_geo_field_at_index_cc::FieldAtIndex::get_varray_for_context(), Spline::interpolate_to_evaluated(), blender::fn::MFParams::readonly_single_input(), blender::bke::mesh_surface_sample::sample_corner_attribute(), blender::bke::mesh_surface_sample::sample_face_attribute(), blender::bke::mesh_surface_sample::sample_point_attribute(), blender::nodes::node_geo_dual_mesh_cc::transfer_attributes(), and blender::bke::GAttributeReader::typed().


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