Blender V5.3
blender::bke::GList Class Reference

#include <NOD_geometry_nodes_list.hh>

Inherits blender::blender::ImplicitSharingMixin.

Classes

class  ArrayData
class  SingleData

Public Types

using DataVariant = std::variant<ArrayData, SingleData>

Public Member Functions

 GList ()=delete
 GList (const CPPType &type)
 GList (const CPPType &type, DataVariant data, const int64_t size)
DataVariant & data ()
const DataVariant & data () const
const CPPType & cpp_type () const
int64_t size () const
std::variant< GSpan, GPointer > values () const
std::variant< GMutableSpan, GMutablePointer > values_for_write ()
void delete_self () override
GListPtr copy () const
GVArray varray () const
void count_memory (MemoryCounter &memory) const
void ensure_owns_direct_data ()
bool owns_direct_data () const
template<typename T>
const List< T > & typed () const
template<typename T>
List< T > & typed ()
Public Member Functions inherited from blender::blender::ImplicitSharingInfo
virtual ~ImplicitSharingInfo ()
bool is_mutable () const
bool is_expired () const
void add_user () const
void add_weak_user () const
void tag_ensured_mutable () const
int64_t version () const
int strong_users () const
void remove_user_and_delete_if_last () const
void remove_weak_user_and_delete_if_last () const

Static Public Member Functions

static GListPtr create (const CPPType &type, DataVariant data, const int64_t size)
template<typename ContainerT>
static GListPtr from_container (ContainerT &&container)
static GListPtr from_garray (GArray<> array)
static GListPtr from_single (GPointer value, int64_t size)

Detailed Description

Definition at line 22 of file NOD_geometry_nodes_list.hh.

Member Typedef Documentation

◆ DataVariant

Definition at line 58 of file NOD_geometry_nodes_list.hh.

Constructor & Destructor Documentation

◆ GList() [1/3]

GList is expected to always have a valid CPPType. Therefore, it can't be default constructed.

◆ GList() [2/3]

blender::nodes::GList::GList ( const CPPType & type)
inline

Definition at line 71 of file NOD_geometry_nodes_list.hh.

◆ GList() [3/3]

blender::nodes::GList::GList ( const CPPType & type,
DataVariant data,
const int64_t size )

Definition at line 258 of file geometry_nodes_list.cc.

Member Function Documentation

◆ copy()

Definition at line 80 of file geometry_nodes_list.cc.

◆ count_memory()

Definition at line 97 of file geometry_nodes_list.cc.

◆ cpp_type()

const CPPType & blender::nodes::GList::cpp_type ( ) const
inline

Definition at line 218 of file NOD_geometry_nodes_list.hh.

◆ create()

GListPtr blender::nodes::GList::create ( const CPPType & type,
DataVariant data,
const int64_t size )
static

Definition at line 263 of file geometry_nodes_list.cc.

◆ data() [1/2]

◆ data() [2/2]

Definition at line 213 of file NOD_geometry_nodes_list.hh.

◆ delete_self()

void blender::nodes::GList::delete_self ( )
overridevirtual

Implements blender::blender::ImplicitSharingMixin.

Definition at line 75 of file geometry_nodes_list.cc.

◆ ensure_owns_direct_data()

◆ from_container()

template<typename ContainerT>
GListPtr blender::nodes::GList::from_container ( ContainerT && container)
inlinestatic

Definition at line 188 of file NOD_geometry_nodes_list.hh.

◆ from_garray()

◆ from_single()

◆ owns_direct_data()

Definition at line 130 of file geometry_nodes_list.cc.

◆ size()

Definition at line 223 of file NOD_geometry_nodes_list.hh.

◆ typed() [1/2]

template<typename T>
List< T > & blender::nodes::GList::typed ( )
inline

Definition at line 235 of file NOD_geometry_nodes_list.hh.

◆ typed() [2/2]

template<typename T>
const List< T > & blender::nodes::GList::typed ( ) const
inline

Get a typed reference to this field. Note that Field<T> happens to be identical to GField on a bit-level. So this is just a cast.

Definition at line 228 of file NOD_geometry_nodes_list.hh.

◆ values()

std::variant< GSpan, GPointer > blender::nodes::GList::values ( ) const

Access values stored in the list. This is a variant because lists support different storage backends and more may be added in the future.

Definition at line 234 of file geometry_nodes_list.cc.

◆ values_for_write()

◆ varray()

Access the list as virtual array.

Definition at line 85 of file geometry_nodes_list.cc.


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