|
Blender V5.0
|
#include <NOD_geometry_nodes_bundle.hh>
Inherits blender::ImplicitSharingMixin.
Classes | |
| struct | StoredItem |
Public Member Functions | |
| bool | add (StringRef key, const BundleItemValue &value) |
| void | add_new (StringRef key, const BundleItemValue &value) |
| void | add_override (StringRef key, const BundleItemValue &value) |
| bool | add_path (StringRef path, const BundleItemValue &value) |
| void | add_path_new (StringRef path, const BundleItemValue &value) |
| void | add_path_override (StringRef path, const BundleItemValue &value) |
| template<typename T> | |
| void | add (StringRef key, T value) |
| template<typename T> | |
| void | add_override (StringRef key, T value) |
| template<typename T> | |
| void | add_path (StringRef path, T value) |
| template<typename T> | |
| void | add_path_override (StringRef path, T value) |
| bool | remove (StringRef key) |
| bool | contains (StringRef key) const |
| bool | contains_path (StringRef path) const |
| const BundleItemValue * | lookup (StringRef key) const |
| const BundleItemValue * | lookup_path (Span< StringRef > path) const |
| const BundleItemValue * | lookup_path (StringRef path) const |
| template<typename T> | |
| std::optional< T > | lookup (StringRef key) const |
| template<typename T> | |
| std::optional< T > | lookup_path (StringRef path) const |
| bool | is_empty () const |
| int64_t | size () const |
| Span< StoredItem > | items () const |
| BundlePtr | copy () const |
| void | delete_self () override |
| Public Member Functions inherited from 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 (const Span< StringRef > path) |
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 52 of file NOD_geometry_nodes_bundle.hh.
| bool blender::nodes::Bundle::add | ( | StringRef | key, |
| const BundleItemValue & | value ) |
Definition at line 57 of file geometry_nodes_bundle.cc.
References add_new(), and contains().
Referenced by add(), add_path_override(), blender::bke::bake::copy_bake_item_to_socket_value(), blender::nodes::node_geo_combine_bundle_cc::node_geo_exec(), blender::nodes::node_geo_join_bundle::node_geo_exec(), and blender::nodes::tests::TEST_F().
Definition at line 230 of file NOD_geometry_nodes_bundle.hh.
References add(), T, and blender::nodes::to_stored_type().
| void blender::nodes::Bundle::add_new | ( | StringRef | key, |
| const BundleItemValue & | value ) |
Definition at line 45 of file geometry_nodes_bundle.cc.
References BLI_assert, and blender::nodes::is_valid_key().
Referenced by add(), add_override(), and add_path_override().
| void blender::nodes::Bundle::add_override | ( | StringRef | key, |
| const BundleItemValue & | value ) |
Definition at line 51 of file geometry_nodes_bundle.cc.
References add_new(), and remove().
Referenced by add_override().
Definition at line 241 of file NOD_geometry_nodes_bundle.hh.
References add_override(), T, and blender::nodes::to_stored_type().
| bool blender::nodes::Bundle::add_path | ( | StringRef | path, |
| const BundleItemValue & | value ) |
Definition at line 96 of file geometry_nodes_bundle.cc.
References add_path_new(), and contains_path().
Referenced by add_path(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), and blender::nodes::tests::TEST_F().
Definition at line 235 of file NOD_geometry_nodes_bundle.hh.
References add_path(), T, and blender::nodes::to_stored_type().
| void blender::nodes::Bundle::add_path_new | ( | StringRef | path, |
| const BundleItemValue & | value ) |
Definition at line 105 of file geometry_nodes_bundle.cc.
References add_path_override(), BLI_assert, and contains_path().
Referenced by add_path().
| void blender::nodes::Bundle::add_path_override | ( | StringRef | path, |
| const BundleItemValue & | value ) |
Definition at line 66 of file geometry_nodes_bundle.cc.
References add(), add_new(), add_path_override(), BLI_assert, create(), blender::StringRefBase::endswith(), blender::StringRefBase::find_first_of(), blender::bke::SocketValueVariant::From(), blender::StringRefBase::is_empty(), blender::ImplicitSharingInfo::is_mutable(), lookup(), blender::bke::node_socket_type_find_static(), blender::StringRefBase::not_found, remove(), SOCK_BUNDLE, and blender::StringRefBase::substr().
Referenced by add_path_new(), add_path_override(), add_path_override(), and blender::nodes::tests::TEST_F().
|
inline |
Definition at line 247 of file NOD_geometry_nodes_bundle.hh.
References add_path_override(), T, and blender::nodes::to_stored_type().
Create the combined path by inserting '/' between each element.
Definition at line 194 of file geometry_nodes_bundle.cc.
| bool blender::nodes::Bundle::contains | ( | StringRef | key | ) | const |
Definition at line 178 of file geometry_nodes_bundle.cc.
References BLI_assert, and blender::nodes::is_valid_key().
Referenced by add(), and blender::nodes::tests::TEST_F().
| bool blender::nodes::Bundle::contains_path | ( | StringRef | path | ) | const |
Definition at line 189 of file geometry_nodes_bundle.cc.
References lookup_path().
Referenced by add_path(), and add_path_new().
| BundlePtr blender::nodes::Bundle::copy | ( | ) | const |
Definition at line 161 of file geometry_nodes_bundle.cc.
References copy(), and create().
Referenced by copy().
|
static |
Definition at line 35 of file geometry_nodes_bundle.cc.
Referenced by add_path_override(), copy(), blender::bke::bake::copy_bake_item_to_socket_value(), blender::nodes::node_geo_combine_bundle_cc::node_geo_exec(), blender::nodes::node_geo_join_bundle::node_geo_exec(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), and blender::nodes::tests::TEST_F().
|
overridevirtual |
Implements blender::ImplicitSharingMixin.
Definition at line 199 of file geometry_nodes_bundle.cc.
|
inline |
Definition at line 259 of file NOD_geometry_nodes_bundle.hh.
References blender::Span< T >::is_empty().
|
inline |
Definition at line 254 of file NOD_geometry_nodes_bundle.hh.
Referenced by blender::ed::spreadsheet::ViewerDataTreeView::build_bundle_children(), and blender::bke::bake::move_common_socket_value_to_bake_item().
|
inline |
Definition at line 183 of file NOD_geometry_nodes_bundle.hh.
References blender::nodes::BundleItemValue::as(), lookup(), and T.
| const BundleItemValue * blender::nodes::Bundle::lookup | ( | StringRef | key | ) | const |
Definition at line 111 of file geometry_nodes_bundle.cc.
Referenced by add_path_override(), lookup(), lookup_path(), and blender::nodes::tests::TEST_F().
| const BundleItemValue * blender::nodes::Bundle::lookup_path | ( | Span< StringRef > | path | ) | const |
Definition at line 121 of file geometry_nodes_bundle.cc.
References blender::nodes::BundleItemValue::as(), BLI_assert, blender::Span< T >::drop_front(), blender::Span< T >::is_empty(), lookup(), and blender::Span< T >::size().
Referenced by contains_path(), lookup_path(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), and blender::nodes::tests::TEST_F().
|
inline |
Definition at line 192 of file NOD_geometry_nodes_bundle.hh.
References blender::nodes::BundleItemValue::as(), lookup_path(), and T.
| const BundleItemValue * blender::nodes::Bundle::lookup_path | ( | StringRef | path | ) | const |
Definition at line 155 of file geometry_nodes_bundle.cc.
References lookup_path(), and blender::nodes::split_path().
| bool blender::nodes::Bundle::remove | ( | StringRef | key | ) |
Definition at line 171 of file geometry_nodes_bundle.cc.
References BLI_assert, blender::nodes::is_valid_key(), and blender::nodes::Bundle::StoredItem::key.
Referenced by add_override(), and add_path_override().
|
inline |
Definition at line 264 of file NOD_geometry_nodes_bundle.hh.
Referenced by blender::nodes::tests::TEST_F(), and blender::nodes::tests::TEST_F().