Blender  V3.3
Friends | List of all members
blender::bke::AttributeIDRef Class Reference

#include <BKE_attribute.hh>

Public Member Functions

#AttributeIDRef Inline Methods
 AttributeIDRef ()
 
 AttributeIDRef (StringRef name)
 
 AttributeIDRef (StringRefNull name)
 
 AttributeIDRef (const char *name)
 
 AttributeIDRef (const std::string &name)
 
 AttributeIDRef (const AnonymousAttributeID *anonymous_id)
 
 operator bool () const
 
uint64_t hash () const
 
bool is_named () const
 
bool is_anonymous () const
 
StringRef name () const
 
const AnonymousAttributeIDanonymous_id () const
 
bool should_be_kept () const
 

Friends

bool operator== (const AttributeIDRef &a, const AttributeIDRef &b)
 
std::ostream & operator<< (std::ostream &stream, const AttributeIDRef &attribute_id)
 

Detailed Description

Identifies an attribute that is either named or anonymous. It does not own the identifier, so it is just a reference.

Definition at line 24 of file BKE_attribute.hh.

Constructor & Destructor Documentation

◆ AttributeIDRef() [1/6]

blender::bke::AttributeIDRef::AttributeIDRef ( )
inlinedefault

◆ AttributeIDRef() [2/6]

blender::bke::AttributeIDRef::AttributeIDRef ( StringRef  name)
inline

Definition at line 762 of file BKE_attribute.hh.

◆ AttributeIDRef() [3/6]

blender::bke::AttributeIDRef::AttributeIDRef ( StringRefNull  name)
inline

Definition at line 766 of file BKE_attribute.hh.

◆ AttributeIDRef() [4/6]

blender::bke::AttributeIDRef::AttributeIDRef ( const char *  name)
inline

Definition at line 770 of file BKE_attribute.hh.

◆ AttributeIDRef() [5/6]

blender::bke::AttributeIDRef::AttributeIDRef ( const std::string &  name)
inline

Definition at line 774 of file BKE_attribute.hh.

◆ AttributeIDRef() [6/6]

blender::bke::AttributeIDRef::AttributeIDRef ( const AnonymousAttributeID anonymous_id)
inline

Definition at line 779 of file BKE_attribute.hh.

Member Function Documentation

◆ anonymous_id()

const AnonymousAttributeID & blender::bke::AttributeIDRef::anonymous_id ( ) const
inline

◆ hash()

uint64_t blender::bke::AttributeIDRef::hash ( ) const
inline

Definition at line 794 of file BKE_attribute.hh.

References blender::get_default_hash_2().

◆ is_anonymous()

bool blender::bke::AttributeIDRef::is_anonymous ( ) const
inline

◆ is_named()

bool blender::bke::AttributeIDRef::is_named ( ) const
inline

◆ name()

StringRef blender::bke::AttributeIDRef::name ( ) const
inline

◆ operator bool()

blender::bke::AttributeIDRef::operator bool ( ) const
inline

Definition at line 789 of file BKE_attribute.hh.

◆ should_be_kept()

bool blender::bke::AttributeIDRef::should_be_kept ( ) const
inline
Returns
True if the attribute should not be removed automatically as an optimization during processing or copying. Anonymous attributes can be removed when they no longer have any references.

Definition at line 826 of file BKE_attribute.hh.

References BKE_anonymous_attribute_id_has_strong_references(), and is_named().

Referenced by GeometrySet::gather_attributes_for_propagation().

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  stream,
const AttributeIDRef attribute_id 
)
friend

Definition at line 39 of file attribute_access.cc.

◆ operator==

bool operator== ( const AttributeIDRef a,
const AttributeIDRef b 
)
friend

Definition at line 784 of file BKE_attribute.hh.


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