|
Blender
V2.93
|
#include <BKE_attribute_access.hh>
Inherited by blender::bke::ArrayReadAttribute< T >, blender::bke::ConstantReadAttribute, blender::bke::ConvertedReadAttribute, blender::bke::DerivedArrayReadAttribute< StructT, ElemT, GetFunc >, blender::bke::OwnedArrayReadAttribute< T >, and blender::bke::VertexWeightReadAttribute.
Public Member Functions | |
| ReadAttribute (AttributeDomain domain, const CPPType &cpp_type, const int64_t size) | |
| AttributeDomain | domain () const |
| const CPPType & | cpp_type () const |
| CustomDataType | custom_data_type () const |
| int64_t | size () const |
| void | get (const int64_t index, void *r_value) const |
| template<typename T > | |
| Span< T > | get_span () const |
Protected Member Functions | |
| virtual void | get_internal (const int64_t index, void *r_value) const =0 |
Protected Attributes | |
| const AttributeDomain | domain_ |
| const CPPType & | cpp_type_ |
| const CustomDataType | custom_data_type_ |
| const int64_t | size_ |
| std::mutex | span_mutex_ |
| void * | array_buffer_ = nullptr |
| bool | array_is_temporary_ = false |
Attribute Accessor implementations | |
| virtual | ~ReadAttribute () |
| fn::GSpan | get_span () const |
| virtual void | initialize_span () const |
This class offers an indirection for reading an attribute. This is useful for the following reasons:
Definition at line 51 of file BKE_attribute_access.hh.
|
inline |
Definition at line 67 of file BKE_attribute_access.hh.
|
virtual |
Definition at line 57 of file attribute_access.cc.
References array_buffer_, array_is_temporary_, cpp_type_, blender::fn::CPPType::destruct_n(), MEM_freeN, and size_.
|
inline |
Definition at line 82 of file BKE_attribute_access.hh.
References cpp_type_.
Referenced by blender::bke::TypedReadAttribute< T >::TypedReadAttribute().
|
inline |
Definition at line 87 of file BKE_attribute_access.hh.
References custom_data_type_.
Referenced by blender::ed::spreadsheet::GeometryDataSource::get_column_values().
|
inline |
Definition at line 77 of file BKE_attribute_access.hh.
References domain_.
Referenced by blender::ed::spreadsheet::GeometryDataSource::get_column_values().
|
inline |
Definition at line 97 of file BKE_attribute_access.hh.
References BLI_assert, get_internal(), and size_.
Referenced by blender::bke::TypedReadAttribute< T >::operator[]().
|
protectedpure virtual |
| fn::GSpan blender::bke::ReadAttribute::get_span | ( | ) | const |
Definition at line 65 of file attribute_access.cc.
References array_buffer_, cpp_type_, initialize_span(), size_, and span_mutex_.
Referenced by get_span(), and blender::bke::TypedReadAttribute< T >::get_span().
Definition at line 106 of file BKE_attribute_access.hh.
References get_span(), T, and blender::fn::GSpan::typed().
|
protectedvirtual |
Reimplemented in blender::bke::OwnedArrayReadAttribute< T >, blender::bke::ArrayReadAttribute< T >, and blender::bke::ConstantReadAttribute.
Definition at line 79 of file attribute_access.cc.
References blender::fn::CPPType::alignment(), array_buffer_, array_is_temporary_, cpp_type_, get_internal(), MEM_mallocN_aligned, POINTER_OFFSET, blender::fn::CPPType::size(), and size_.
Referenced by get_span().
|
inline |
Definition at line 92 of file BKE_attribute_access.hh.
References size_.
Referenced by blender::ed::spreadsheet::GeometryDataSource::get_column_values(), and blender::bke::TypedReadAttribute< T >::size().
|
mutableprotected |
|
mutableprotected |
|
protected |
Definition at line 54 of file BKE_attribute_access.hh.
Referenced by cpp_type(), blender::bke::ConstantReadAttribute::get_internal(), get_span(), initialize_span(), blender::bke::ConstantReadAttribute::initialize_span(), blender::bke::ConstantReadAttribute::~ConstantReadAttribute(), and ~ReadAttribute().
|
protected |
Definition at line 55 of file BKE_attribute_access.hh.
Referenced by custom_data_type().
|
protected |
Definition at line 53 of file BKE_attribute_access.hh.
Referenced by domain().
|
protected |
Definition at line 56 of file BKE_attribute_access.hh.
Referenced by get(), get_span(), initialize_span(), blender::bke::ConstantReadAttribute::initialize_span(), size(), and ~ReadAttribute().
|
mutableprotected |
Definition at line 59 of file BKE_attribute_access.hh.
Referenced by get_span().