Blender  V2.93
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
blender::bke::ReadAttribute Class Referenceabstract

#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 CPPTypecpp_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< Tget_span () const
 

Protected Member Functions

virtual void get_internal (const int64_t index, void *r_value) const =0
 

Protected Attributes

const AttributeDomain domain_
 
const CPPTypecpp_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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ReadAttribute()

blender::bke::ReadAttribute::ReadAttribute ( AttributeDomain  domain,
const CPPType cpp_type,
const int64_t  size 
)
inline

Definition at line 67 of file BKE_attribute_access.hh.

◆ ~ReadAttribute()

blender::bke::ReadAttribute::~ReadAttribute ( )
virtual

Member Function Documentation

◆ cpp_type()

const CPPType& blender::bke::ReadAttribute::cpp_type ( ) const
inline

◆ custom_data_type()

CustomDataType blender::bke::ReadAttribute::custom_data_type ( ) const
inline

◆ domain()

AttributeDomain blender::bke::ReadAttribute::domain ( ) const
inline

◆ get()

void blender::bke::ReadAttribute::get ( const int64_t  index,
void *  r_value 
) const
inline

◆ get_internal()

virtual void blender::bke::ReadAttribute::get_internal ( const int64_t  index,
void *  r_value 
) const
protectedpure virtual

◆ get_span() [1/2]

fn::GSpan blender::bke::ReadAttribute::get_span ( ) const

◆ get_span() [2/2]

template<typename T >
Span<T> blender::bke::ReadAttribute::get_span ( ) const
inline

Definition at line 106 of file BKE_attribute_access.hh.

References get_span(), T, and blender::fn::GSpan::typed().

◆ initialize_span()

void blender::bke::ReadAttribute::initialize_span ( ) const
protectedvirtual

◆ size()

int64_t blender::bke::ReadAttribute::size ( ) const
inline

Member Data Documentation

◆ array_buffer_

void* blender::bke::ReadAttribute::array_buffer_ = nullptr
mutableprotected

◆ array_is_temporary_

bool blender::bke::ReadAttribute::array_is_temporary_ = false
mutableprotected

◆ cpp_type_

const CPPType& blender::bke::ReadAttribute::cpp_type_
protected

◆ custom_data_type_

const CustomDataType blender::bke::ReadAttribute::custom_data_type_
protected

Definition at line 55 of file BKE_attribute_access.hh.

Referenced by custom_data_type().

◆ domain_

const AttributeDomain blender::bke::ReadAttribute::domain_
protected

Definition at line 53 of file BKE_attribute_access.hh.

Referenced by domain().

◆ size_

const int64_t blender::bke::ReadAttribute::size_
protected

◆ span_mutex_

std::mutex blender::bke::ReadAttribute::span_mutex_
mutableprotected

Definition at line 59 of file BKE_attribute_access.hh.

Referenced by get_span().


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