19 return a.
items.as_span() ==
b.items.as_span();
37 return BundlePtr(MEM_new<Bundle>(__func__));
48 items_.append(
StoredItem{std::move(key), value});
84 if (!child_bundle->is_mutable()) {
85 child_bundle = child_bundle->copy();
87 child_bundle->tag_ensured_mutable();
90 std::move(child_bundle));
114 if (item.key == key) {
129 if (path.
size() == 1) {
136 return child_bundle->lookup_path(path.
drop_front(1));
146 path_elems.
append(remaining);
150 remaining = remaining.
substr(sep + 1);
166 copy.add_new(item.key, item.value);
174 const int removed_num = items_.remove_if([&key](
StoredItem &item) {
return item.
key == key; });
175 return removed_num >= 1;
182 if (item.key == key) {
196 return fmt::format(
"{}", fmt::join(path,
"/"));
207 const bool allow_auto_structure_type)
210 return stored_structure_type;
212 if (allow_auto_structure_type) {
219 const bool allow_auto_structure_type)
221 BLI_assert(node.is_type(
"NodeCombineBundle"));
224 for (
const int i :
IndexRange(storage.items_num)) {
232 allow_auto_structure_type);
233 signature.
items.add({item.
name, stype, structure_type});
240 const bool allow_auto_structure_type)
242 BLI_assert(node.is_type(
"NodeSeparateBundle"));
245 for (
const int i :
IndexRange(storage.items_num)) {
253 allow_auto_structure_type);
254 signature.
items.add({item.
name, stype, structure_type});
263 if (item.is_signature_definition) {
273 for (
const Item &src_signature : this->
items) {
275 if (!signature.
items.add(item)) {
NodeSocketInterfaceStructureType
@ NODE_INTERFACE_SOCKET_STRUCTURE_TYPE_DYNAMIC
@ NODE_INTERFACE_SOCKET_STRUCTURE_TYPE_AUTO
constexpr Span drop_front(int64_t n) const
constexpr int64_t size() const
constexpr bool is_empty() const
static constexpr int64_t not_found
constexpr int64_t find(char c, int64_t pos=0) const
constexpr bool is_empty() const
constexpr StringRef substr(int64_t start, int64_t size) const
constexpr bool endswith(StringRef suffix) const
constexpr int64_t find_first_of(StringRef chars, int64_t pos=0) const
void append(const T &value)
static SocketValueVariant From(T &&value)
bool remove(StringRef key)
void delete_self() override
void add_path_new(StringRef path, const BundleItemValue &value)
void add_new(StringRef key, const BundleItemValue &value)
bool contains_path(StringRef path) const
static BundlePtr create()
void add_override(StringRef key, const BundleItemValue &value)
const BundleItemValue * lookup(StringRef key) const
void add_path_override(StringRef path, const BundleItemValue &value)
bool add(StringRef key, const BundleItemValue &value)
static std::string combine_path(const Span< StringRef > path)
const BundleItemValue * lookup_path(Span< StringRef > path) const
bool add_path(StringRef path, const BundleItemValue &value)
bool contains(StringRef key) const
bNodeSocketType * node_socket_type_find_static(int type, int subtype=0)
bool operator==(const BokehKernelKey &a, const BokehKernelKey &b)
bool operator!=(const Domain &a, const Domain &b)
ImplicitSharingPtr< Bundle > BundlePtr
static bool is_valid_key(const StringRef key)
NodeSocketInterfaceStructureType get_structure_type_for_bundle_signature(const bNodeSocket &socket, const NodeSocketInterfaceStructureType stored_structure_type, const bool allow_auto_structure_type)
static Vector< StringRef > split_path(const StringRef path)
bNodeSocketRuntimeHandle * runtime
std::optional< T > as() const
const bke::bNodeSocketType * type
NodeSocketInterfaceStructureType structure_type
void set_auto_structure_types()
static BundleSignature from_separate_bundle_node(const bNode &node, bool allow_auto_structure_type)
CustomIDVectorSet< Item, ItemKeyGetter > items
static BundleSignature from_combine_bundle_node(const bNode &node, bool allow_auto_structure_type)
bool has_type_definition() const
std::optional< BundleSignature > get_merged_signature() const