Blender V5.3
blender::bke::tests::Bundle Class Reference

#include <NOD_geometry_nodes_bundle.hh>

Inherits blender::blender::ImplicitSharingMixin.

Public Types

using BundleItemMap = Map<BundleKey, BundleItemValue>

Public Member Functions

bool add (BundleKey key, const BundleItemValue &value)
bool add (BundleKey key, BundleItemValue &&value)
template<typename T>
requires (!std::is_same_v<std::decay_t<T>, BundleItemValue>)
void add (BundleKey key, T &&value)
void add_new (BundleKey key, const BundleItemValue &value)
void add_new (BundleKey key, BundleItemValue &&value)
template<typename T>
requires (!std::is_same_v<std::decay_t<T>, BundleItemValue>)
void add_new (BundleKey key, T &&value)
void add_override (BundleKey key, const BundleItemValue &value)
template<typename T>
requires (!std::is_same_v<std::decay_t<T>, BundleItemValue>)
void add_override (BundleKey key, T &&value)
bool add_path (StringRef path, const BundleItemValue &value)
template<typename T>
requires (!std::is_same_v<std::decay_t<T>, BundleItemValue>)
void add_path (StringRef path, T &&value)
void add_path_new (StringRef path, const BundleItemValue &value)
void add_path_override (StringRef path, const BundleItemValue &value)
void add_path_override (Span< BundleKey > path, const BundleItemValue &value)
template<typename T>
requires (!std::is_same_v<std::decay_t<T>, BundleItemValue>)
void add_path_override (Span< BundleKey > path, T &&value)
template<typename T>
requires (!std::is_same_v<std::decay_t<T>, BundleItemValue>)
void add_path_override (StringRef path, T &&value)
bool remove (BundleKey key)
bool remove_path (StringRef path)
bool remove_path (Span< BundleKey > path)
bool contains (BundleKey key) const
bool contains_path (StringRef path) const
bool contains_path (Span< BundleKey > path) const
const BundleItemValue * lookup (BundleKey key) const
BundleItemValue * lookup (BundleKey key)
template<typename T>
std::optional< T > lookup (BundleKey key) const
const BundleItemValue * lookup_path (Span< BundleKey > path) const
const BundleItemValue * lookup_path (StringRef path) const
template<typename T>
std::optional< T > lookup_path (Span< BundleKey > path) const
template<typename T>
std::optional< T > lookup_path (StringRef path) const
BundleItemValue * lookup_path_for_write (Span< BundleKey > path)
BundleItemValue * lookup_path_for_write (StringRef path)
template<typename T>
T * lookup_ptr (BundleKey key)
template<typename T>
const T * lookup_ptr (BundleKey key) const
template<typename T>
const T * lookup_path_ptr (StringRef path) const
template<typename T>
const T * lookup_path_ptr (Span< BundleKey > path) const
template<typename T>
T * lookup_path_for_write_ptr (StringRef path)
template<typename T>
T * lookup_path_for_write_ptr (Span< BundleKey > path)
Bundle & ensure_nested_bundle (StringRef path)
void merge (const Bundle &other)
void merge_override (const Bundle &other)
bool is_empty () const
int64_t size () const
void clear ()
std::optional< StringRef > type () const
void ensure_owns_direct_data ()
bool owns_direct_data () const
BundleItemMap::ItemIterator items () const
BundleItemMap::MutableItemIterator items ()
BundlePtr copy () const
void delete_self () override
void count_memory (MemoryCounter &memory) const
Vector< std::string > gather_paths (FunctionRef< bool(const Bundle &bundle)> fn) const
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 BundlePtr create ()
static std::string combine_path (Span< StringRef > path)
static std::string combine_path (Span< BundleKey > path)
static bool is_valid_path (StringRef path)
static std::optional< Vector< BundleKey > > split_path (StringRef path)

Static Public Attributes

static BundleKey type_item_name = *BundleKey::from_str("Type")

Detailed Description

A bundle is a map containing keys and their corresponding values.

The API also supports working with paths in nested bundles like root/child/data.

Definition at line 90 of file NOD_geometry_nodes_bundle.hh.

Member Typedef Documentation

◆ BundleItemMap

Member Function Documentation

◆ add() [1/3]

Definition at line 118 of file geometry_nodes_bundle.cc.

◆ add() [2/3]

Definition at line 109 of file geometry_nodes_bundle.cc.

◆ add() [3/3]

template<typename T>
requires (!std::is_same_v<std::decay_t<T>, BundleItemValue>)
void blender::nodes::Bundle::add ( BundleKey key,
T && value )
inline

Definition at line 422 of file NOD_geometry_nodes_bundle.hh.

◆ add_new() [1/3]

Definition at line 98 of file geometry_nodes_bundle.cc.

◆ add_new() [2/3]

Definition at line 93 of file geometry_nodes_bundle.cc.

◆ add_new() [3/3]

template<typename T>
requires (!std::is_same_v<std::decay_t<T>, BundleItemValue>)
void blender::nodes::Bundle::add_new ( BundleKey key,
T && value )
inline

Definition at line 430 of file NOD_geometry_nodes_bundle.hh.

◆ add_override() [1/2]

Definition at line 103 of file geometry_nodes_bundle.cc.

◆ add_override() [2/2]

template<typename T>
requires (!std::is_same_v<std::decay_t<T>, BundleItemValue>)
void blender::nodes::Bundle::add_override ( BundleKey key,
T && value )
inline

Definition at line 448 of file NOD_geometry_nodes_bundle.hh.

◆ add_path() [1/2]

Definition at line 159 of file geometry_nodes_bundle.cc.

◆ add_path() [2/2]

template<typename T>
requires (!std::is_same_v<std::decay_t<T>, BundleItemValue>)
void blender::nodes::Bundle::add_path ( StringRef path,
T && value )
inline

Definition at line 439 of file NOD_geometry_nodes_bundle.hh.

◆ add_path_new()

Definition at line 168 of file geometry_nodes_bundle.cc.

◆ add_path_override() [1/4]

Definition at line 135 of file geometry_nodes_bundle.cc.

◆ add_path_override() [2/4]

template<typename T>
requires (!std::is_same_v<std::decay_t<T>, BundleItemValue>)
void blender::nodes::Bundle::add_path_override ( Span< BundleKey > path,
T && value )
inline

Definition at line 466 of file NOD_geometry_nodes_bundle.hh.

◆ add_path_override() [3/4]

Definition at line 152 of file geometry_nodes_bundle.cc.

◆ add_path_override() [4/4]

template<typename T>
requires (!std::is_same_v<std::decay_t<T>, BundleItemValue>)
void blender::nodes::Bundle::add_path_override ( StringRef path,
T && value )
inline

Definition at line 457 of file NOD_geometry_nodes_bundle.hh.

◆ clear()

Definition at line 352 of file geometry_nodes_bundle.cc.

◆ combine_path() [1/2]

std::string blender::nodes::Bundle::combine_path ( Span< BundleKey > path)
static

Definition at line 342 of file geometry_nodes_bundle.cc.

◆ combine_path() [2/2]

std::string blender::nodes::Bundle::combine_path ( Span< StringRef > path)
static

Create the combined path by inserting '/' between each element.

Definition at line 337 of file geometry_nodes_bundle.cc.

◆ contains()

Definition at line 322 of file geometry_nodes_bundle.cc.

◆ contains_path() [1/2]

Definition at line 332 of file geometry_nodes_bundle.cc.

◆ contains_path() [2/2]

Definition at line 327 of file geometry_nodes_bundle.cc.

◆ copy()

Definition at line 285 of file geometry_nodes_bundle.cc.

◆ count_memory()

Definition at line 363 of file geometry_nodes_bundle.cc.

◆ create()

◆ delete_self()

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

Implements blender::blender::ImplicitSharingMixin.

Definition at line 347 of file geometry_nodes_bundle.cc.

◆ ensure_nested_bundle()

◆ ensure_owns_direct_data()

Also see #GeometrySet.ensure_owns_direct_data.

Definition at line 264 of file geometry_nodes_bundle.cc.

◆ gather_paths()

Vector< std::string > blender::nodes::Bundle::gather_paths ( FunctionRef< bool(const Bundle &bundle)> fn) const

◆ is_empty()

bool blender::nodes::Bundle::is_empty ( ) const
inline

Definition at line 483 of file NOD_geometry_nodes_bundle.hh.

◆ is_valid_path()

Definition at line 52 of file geometry_nodes_bundle.cc.

◆ items() [1/2]

Bundle::BundleItemMap::MutableItemIterator blender::nodes::Bundle::items ( )
inline

Definition at line 478 of file NOD_geometry_nodes_bundle.hh.

◆ items() [2/2]

Bundle::BundleItemMap::ItemIterator blender::nodes::Bundle::items ( ) const
inline

Definition at line 473 of file NOD_geometry_nodes_bundle.hh.

◆ lookup() [1/3]

◆ lookup() [2/3]

template<typename T>
std::optional< T > blender::nodes::Bundle::lookup ( BundleKey key) const
inline

Definition at line 303 of file NOD_geometry_nodes_bundle.hh.

◆ lookup() [3/3]

Definition at line 186 of file geometry_nodes_bundle.cc.

◆ lookup_path() [1/4]

template<typename T>
std::optional< T > blender::nodes::Bundle::lookup_path ( Span< BundleKey > path) const
inline

Definition at line 348 of file NOD_geometry_nodes_bundle.hh.

◆ lookup_path() [2/4]

Definition at line 196 of file geometry_nodes_bundle.cc.

◆ lookup_path() [3/4]

template<typename T>
std::optional< T > blender::nodes::Bundle::lookup_path ( StringRef path) const
inline

Definition at line 357 of file NOD_geometry_nodes_bundle.hh.

◆ lookup_path() [4/4]

◆ lookup_path_for_write() [1/2]

◆ lookup_path_for_write() [2/2]

◆ lookup_path_for_write_ptr() [1/2]

template<typename T>
T * blender::nodes::Bundle::lookup_path_for_write_ptr ( Span< BundleKey > path)
inline

Definition at line 336 of file NOD_geometry_nodes_bundle.hh.

◆ lookup_path_for_write_ptr() [2/2]

template<typename T>
T * blender::nodes::Bundle::lookup_path_for_write_ptr ( StringRef path)
inline

Definition at line 342 of file NOD_geometry_nodes_bundle.hh.

◆ lookup_path_ptr() [1/2]

template<typename T>
const T * blender::nodes::Bundle::lookup_path_ptr ( Span< BundleKey > path) const
inline

Definition at line 324 of file NOD_geometry_nodes_bundle.hh.

◆ lookup_path_ptr() [2/2]

template<typename T>
const T * blender::nodes::Bundle::lookup_path_ptr ( StringRef path) const
inline

Definition at line 318 of file NOD_geometry_nodes_bundle.hh.

◆ lookup_ptr() [1/2]

template<typename T>
T * blender::nodes::Bundle::lookup_ptr ( BundleKey key)
inline

Definition at line 312 of file NOD_geometry_nodes_bundle.hh.

◆ lookup_ptr() [2/2]

template<typename T>
const T * blender::nodes::Bundle::lookup_ptr ( BundleKey key) const
inline

Definition at line 330 of file NOD_geometry_nodes_bundle.hh.

◆ merge()

void blender::nodes::Bundle::merge ( const Bundle & other)

Definition at line 250 of file geometry_nodes_bundle.cc.

◆ merge_override()

Definition at line 257 of file geometry_nodes_bundle.cc.

◆ owns_direct_data()

Definition at line 273 of file geometry_nodes_bundle.cc.

◆ remove()

Definition at line 293 of file geometry_nodes_bundle.cc.

◆ remove_path() [1/2]

Definition at line 305 of file geometry_nodes_bundle.cc.

◆ remove_path() [2/2]

◆ size()

Definition at line 488 of file NOD_geometry_nodes_bundle.hh.

◆ split_path()

std::optional< Vector< BundleKey > > blender::nodes::Bundle::split_path ( StringRef path)
static

Definition at line 57 of file geometry_nodes_bundle.cc.

◆ type()

std::optional< StringRef > blender::nodes::Bundle::type ( ) const

Definition at line 357 of file geometry_nodes_bundle.cc.

Member Data Documentation

◆ type_item_name


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