15 : name_(std::move(
name))
17 for (std::unique_ptr<SocketDeclaration> &
decl : decls) {
18 items_.add_new(
Item{std::move(
decl)});
24 const Item *item = items_.lookup_key_ptr_as(
name);
28 return item->
decl.get();
35 return std::make_shared<const FlatBundleType>(std::move(name_), std::move(decls_));
42 for (
const Item &item : items_) {
43 signature.
add(item.name().ref(), item.decl->socket_type);
49 : name_(std::move(
name))
52 items_.add_new(std::move(bundle_type));
65 const Set<BundleType> *types_with_name = registry.types_.lookup_ptr(name);
66 if (!types_with_name) {
69 if (types_with_name->
size() != 1) {
73 if (
const auto *flat_bundle_type = std::get_if<FlatBundleTypePtr>(&bundle_type.
type)) {
74 return *flat_bundle_type;
83 for (
const auto &[name, types] : registry.types_.items()) {
84 if (std::any_of(types.begin(),
87 return std::holds_alternative<FlatBundleTypePtr>(type.type);
99 registry.types_.lookup_or_add_default(bundle_type.
name()).add(bundle_type);
void append(const T &value)
static Vector< std::string > get_all_flat_type_names()
static void register_type(BundleType bundle_type)
static FlatBundleTypePtr try_find_single_flat(StringRef name)
StringRefNull name() const
std::variant< FlatBundleTypePtr, NestedBundleTypePtr > type
static BundleKey type_item_name
FlatBundleTypeBuilder(std::string name)
FlatBundleTypePtr build()
const SocketDeclaration * find_decl(const UString name) const
FlatBundleType(std::string name, Vector< std::unique_ptr< SocketDeclaration > > decls)
BundleSignature to_bundle_signature() const
StringRefNull name() const
NestedBundleType(std::string name, Vector< FlatBundleTypePtr > bundle_types)
StringRefNull name() const
std::shared_ptr< const FlatBundleType > FlatBundleTypePtr
static BundleTypeRegistry & get_bundle_type_registry()
void add(std::string key, const eNodeSocketDatatype socket_type)
std::unique_ptr< SocketDeclaration > decl