25 std::unique_ptr<SocketDeclaration>
decl;
31 struct ItemNameGetter {
34 return item.
decl->name;
54 struct ItemNameGetter {
73 std::variant<FlatBundleTypePtr, NestedBundleTypePtr>
type;
94 template<
typename DeclType>
typename DeclType::Builder &
add(
UString name);
108template<
typename DeclType>
111 static_assert(std::is_base_of_v<SocketDeclaration, DeclType>);
112 using SocketBuilder =
typename DeclType::Builder;
114 auto decl_ptr = std::make_unique<DeclType>();
115 DeclType &
decl = *decl_ptr;
117 auto decl_builder_ptr = std::make_unique<SocketBuilder>();
118 SocketBuilder &decl_builder = *decl_builder_ptr;
120 decl_builder.decl_ = &
decl;
121 decl_builder.decl_base_ = &
decl;
124 decl.identifier = name;
126 decl.socket_type = DeclType::static_socket_type;
128 decls_.append(std::move(decl_ptr));
129 builders_.append(std::move(decl_builder_ptr));
135 return this->
decl->name;
160 return std::visit([](
auto &&
type) {
return type->name(); }, this->
type);
static Vector< std::string > get_all_flat_type_names()
static void register_type(BundleType bundle_type)
static FlatBundleTypePtr try_find_single_flat(StringRef name)
friend bool operator==(const BundleType &a, const BundleType &b)=default
BundleType(FlatBundleTypePtr type)
BundleType(NestedBundleTypePtr type)
StringRefNull name() const
std::variant< FlatBundleTypePtr, NestedBundleTypePtr > type
FlatBundleTypeBuilder(std::string name)
DeclType::Builder & add(UString 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
Span< Item > items() const
StringRefNull name() const
Span< FlatBundleTypePtr > items() const
NestedBundleType(std::string name, Vector< FlatBundleTypePtr > bundle_types)
StringRefNull name() const
std::shared_ptr< const NestedBundleType > NestedBundleTypePtr
std::shared_ptr< const FlatBundleType > FlatBundleTypePtr
unsigned __int64 uint64_t
VectorSet< T, InlineBufferCapacity, DefaultProbingStrategy, CustomIDHash< T, GetIDFn >, CustomIDEqual< T, GetIDFn > > CustomIDVectorSet
constexpr uint64_t get_default_hash(const T &v, const Args &...args)
std::unique_ptr< SocketDeclaration > decl