10SocketInterfaceKey::SocketInterfaceKey(std::string identifier)
12 identifiers_.append(std::move(identifier));
16 : identifiers_(std::move(identifiers))
28 for (
const std::string &identifier : other.identifiers_) {
29 if (identifiers_.
contains(identifier)) {
41 item.type->geometry_nodes_cpp_type->destruct(item.value);
43 for (
void *buffer : buffers_) {
51 this->
add_new(item.key, *item.type, item.value);
56 : items_(std::move(other.items_)), buffers_(std::move(other.buffers_))
76 new (
this)
Bundle(std::move(other));
84 const CPPType &cpp_type = *type.geometry_nodes_cpp_type;
112 if (item.key.matches(
key)) {
121 const int removed_num = items_.remove_if([&
key](
StoredItem &item) {
123 item.type->geometry_nodes_cpp_type->destruct(item.value);
128 return removed_num >= 1;
134 if (item.key.matches(
key)) {
void copy_construct(const void *src, void *dst) const
bool contains(const T &value) const
void append(const T &value)
Bundle & operator=(const Bundle &other)
bool add(const SocketInterfaceKey &key, const bke::bNodeSocketType &type, const void *value)
void add_new(SocketInterfaceKey key, const bke::bNodeSocketType &type, const void *value)
std::optional< Item > lookup(const SocketInterfaceKey &key) const
void delete_self() override
bool contains(const SocketInterfaceKey &key) const
bool remove(const SocketInterfaceKey &key)
bool matches(const SocketInterfaceKey &other) const
Span< std::string > identifiers() const
void * MEM_mallocN_aligned(size_t len, size_t alignment, const char *str)
void MEM_freeN(void *vmemh)
const bke::bNodeSocketType * type