Blender V5.3
blender::nodes::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]

blender::nodes::GList::GList ( )
delete

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

Referenced by GList(), typed(), and typed().

◆ GList() [2/3]

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

Definition at line 71 of file NOD_geometry_nodes_list.hh.

References GList().

◆ 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.

References data(), and size().

Member Function Documentation

◆ copy()

GListPtr blender::nodes::GList::copy ( ) const

Definition at line 80 of file geometry_nodes_list.cc.

References create().

◆ count_memory()

void blender::nodes::GList::count_memory ( MemoryCounter & memory) const

Definition at line 97 of file geometry_nodes_list.cc.

◆ cpp_type()

◆ create()

◆ data() [1/2]

GList::DataVariant & blender::nodes::GList::data ( )
inline

◆ data() [2/2]

const GList::DataVariant & blender::nodes::GList::data ( ) const
inline

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()

◆ from_garray()

◆ from_single()

GListPtr blender::nodes::GList::from_single ( GPointer value,
int64_t size )
static

◆ owns_direct_data()

bool blender::nodes::GList::owns_direct_data ( ) const

◆ size()

◆ typed() [1/2]

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

Definition at line 235 of file NOD_geometry_nodes_list.hh.

References blender::BLI_assert(), cpp_type(), and GList().

◆ 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.

References blender::BLI_assert(), cpp_type(), and GList().

Referenced by ensure_owns_direct_data(), blender::nodes::node_geo_construct_curves_cc::node_geo_exec(), and owns_direct_data().

◆ 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.

References BLI_assert_unreachable, blender::GPointer::GPointer(), and blender::GSpan::GSpan().

Referenced by owns_direct_data(), and blender::bke::detail::SocketValueVariantTypeInfo::try_convert_fn().

◆ values_for_write()

std::variant< GMutableSpan, GMutablePointer > blender::nodes::GList::values_for_write ( )

◆ varray()

GVArray blender::nodes::GList::varray ( ) const

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