| // WARNING: This file is machine generated by fidlgen. |
| |
| // fidl_experiment = output_index_json |
| |
| #pragma once |
| |
| #include <fidl/test.protocollayoutssamelibrary/cpp/common_types.h> |
| #include <fidl/test.protocollayoutssamelibrary/cpp/markers.h> |
| #include <lib/fidl/cpp/natural_coding_traits.h> |
| #include <lib/fidl/cpp/natural_types.h> |
| |
| #include <cinttypes> |
| #include <string> |
| |
| #ifdef __Fuchsia__ |
| |
| #include <lib/zx/channel.h> |
| |
| #endif // __Fuchsia__ |
| |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wshadow" |
| |
| namespace test_protocollayoutssamelibrary { |
| |
| class TablePayload; |
| |
| class ComposedProtocolOneWayAnonComposedRequest; |
| |
| class ComposedProtocolTwoWayAnonComposedResponse; |
| |
| class ComposedProtocolTwoWayAnonComposedWithErrorRequest; |
| |
| class MainProtocolOneWayAnonRequest; |
| |
| class MainProtocolTwoWayAnonResponse; |
| |
| class MainProtocolTwoWayAnonWithErrorRequest; |
| |
| class UnionPayload; |
| |
| class ComposedProtocolTwoWayAnonComposedRequest; |
| |
| class ComposedProtocolTwoWayAnonComposedWithErrorResponse; |
| |
| class ComposedProtocolTwoWayAnonComposedWithErrorResult; |
| |
| class ComposedProtocolOnAnonComposedRequest; |
| |
| class ComposedProtocolTwoWayNamedComposedWithErrorResult; |
| |
| class MainProtocolTwoWayLocalWithErrorResult; |
| |
| class MainProtocolTwoWayAnonRequest; |
| |
| class MainProtocolTwoWayAnonWithErrorResponse; |
| |
| class MainProtocolTwoWayAnonWithErrorResult; |
| |
| class MainProtocolOnAnonRequest; |
| |
| class TablePayload { |
| private: |
| struct Storage_; |
| |
| public: |
| TablePayload(Storage_ storage) noexcept; |
| TablePayload() noexcept = default; |
| TablePayload(TablePayload&&) noexcept = default; |
| TablePayload& operator=(TablePayload&&) noexcept = default; |
| TablePayload(const TablePayload& other) noexcept; |
| TablePayload& operator=(const TablePayload& other) noexcept; |
| bool operator==(const TablePayload& other) const noexcept { |
| return ::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::TablePayload>::Equal(this, &other); |
| } |
| bool operator!=(const TablePayload& other) const noexcept { |
| return !::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::TablePayload>::Equal(this, &other); |
| } |
| |
| bool IsEmpty() const { |
| return !(storage_.a.has_value()); |
| } |
| |
| const std::optional<uint16_t>& a() const { return storage_.a; } |
| ::std::optional<uint16_t>& a() { return storage_.a; } |
| |
| // Setter for a. |
| // |
| |
| TablePayload& a(std::optional<uint16_t> value); |
| |
| TablePayload(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag); |
| |
| private: |
| struct Storage_ final { |
| ::std::optional<uint16_t> a; |
| }; |
| |
| // TODO(https://fxbug.dev/42172795): Box the storage. |
| Storage_ storage_; |
| Storage_ CloneStorage_() const; |
| friend struct ::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::TablePayload>; |
| friend struct ::fidl::internal::MemberVisitor<::test_protocollayoutssamelibrary::TablePayload>; |
| static constexpr auto kMembers = std::make_tuple(::fidl::internal::NaturalTableMember<Storage_, uint16_t, fidl::internal::NaturalCodingConstraintEmpty>{ |
| 1, &Storage_::a}); |
| }; |
| |
| class UnionPayload { |
| private: |
| using Storage_ = |
| std::variant< |
| std::monostate, bool>; |
| |
| public: |
| // TODO: share union tag types between wire & natural. |
| enum class Tag : fidl_xunion_tag_t { |
| kB = 1, // 0x1 |
| }; |
| |
| UnionPayload(UnionPayload&& other) noexcept |
| : UnionPayload(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag{}) { |
| *storage_ = std::move(*other.storage_); |
| } |
| UnionPayload& operator=(UnionPayload&& other) noexcept { |
| if (this != &other) { |
| *storage_ = std::move(*other.storage_); |
| } |
| return *this; |
| } |
| UnionPayload(const UnionPayload& other) noexcept : UnionPayload(other.CloneStorage_()) {} |
| UnionPayload& operator=(const UnionPayload& other) noexcept { |
| if (this != &other) { |
| storage_ = other.CloneStorage_(); |
| } |
| return *this; |
| } |
| |
| bool operator==(const UnionPayload& other) const noexcept { |
| return *storage_ == *other.storage_; |
| } |
| bool operator!=(const UnionPayload& other) const noexcept { |
| return *storage_ != *other.storage_; |
| } |
| |
| constexpr ::test_protocollayoutssamelibrary::UnionPayload::Tag Which() const { |
| return UnionPayload::IndexToTag(storage_->index()).value(); |
| } |
| static UnionPayload WithB(bool val) { |
| return UnionPayload(std::make_shared<Storage_>( |
| std::in_place_index_t<1>{}, |
| std::move(val))); |
| } |
| |
| const ::fidl::internal::UnionMemberView<1, Storage_> b() const { |
| return ::fidl::internal::UnionMemberView<1, Storage_>(storage_); |
| } |
| |
| ::fidl::internal::UnionMemberView<1, Storage_> b() { |
| return ::fidl::internal::UnionMemberView<1, Storage_>(storage_); |
| } |
| |
| // Sets the union to hold the b member. |
| // |
| |
| UnionPayload& b(bool value) { |
| storage_->emplace<1>(std::move(value)); |
| return *this; |
| } |
| |
| UnionPayload(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) |
| : storage_(std::make_shared<Storage_>()) {} |
| |
| private: |
| std::shared_ptr<Storage_> storage_; |
| std::shared_ptr<Storage_> CloneStorage_() const; |
| friend struct ::fidl::internal::NaturalUnionCodingTraits<::test_protocollayoutssamelibrary::UnionPayload>; |
| static constexpr auto kMembers = std::make_tuple( |
| ::fidl::internal::NaturalUnionMember<::fidl::internal::NaturalCodingConstraintEmpty>(), ::fidl::internal::NaturalUnionMember<fidl::internal::NaturalCodingConstraintEmpty>()); |
| |
| explicit UnionPayload(std::shared_ptr<Storage_> storage) : storage_(std::move(storage)) {} |
| |
| static constexpr size_t TagToIndex(::fidl::internal::NaturalDecoder* decoder, ::test_protocollayoutssamelibrary::UnionPayload::Tag tag) { |
| switch (tag) { |
| case ::test_protocollayoutssamelibrary::UnionPayload::Tag::kB: |
| return 1; |
| default: { |
| decoder->SetError(::fidl::internal::kCodingErrorUnknownUnionTag); |
| return 0; |
| } |
| } |
| } |
| |
| static constexpr std::optional<::test_protocollayoutssamelibrary::UnionPayload::Tag> IndexToTag(size_t index) { |
| switch (index) { |
| case 1: |
| return ::test_protocollayoutssamelibrary::UnionPayload::Tag::kB; |
| default: |
| return std::nullopt; |
| } |
| } |
| }; |
| |
| class ComposedProtocolOneWayAnonComposedRequest { |
| private: |
| struct Storage_; |
| |
| public: |
| ComposedProtocolOneWayAnonComposedRequest(Storage_ storage) noexcept; |
| ComposedProtocolOneWayAnonComposedRequest() noexcept = default; |
| ComposedProtocolOneWayAnonComposedRequest(ComposedProtocolOneWayAnonComposedRequest&&) noexcept = default; |
| ComposedProtocolOneWayAnonComposedRequest& operator=(ComposedProtocolOneWayAnonComposedRequest&&) noexcept = default; |
| ComposedProtocolOneWayAnonComposedRequest(const ComposedProtocolOneWayAnonComposedRequest& other) noexcept; |
| ComposedProtocolOneWayAnonComposedRequest& operator=(const ComposedProtocolOneWayAnonComposedRequest& other) noexcept; |
| bool operator==(const ComposedProtocolOneWayAnonComposedRequest& other) const noexcept { |
| return ::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolOneWayAnonComposedRequest>::Equal(this, &other); |
| } |
| bool operator!=(const ComposedProtocolOneWayAnonComposedRequest& other) const noexcept { |
| return !::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolOneWayAnonComposedRequest>::Equal(this, &other); |
| } |
| |
| bool IsEmpty() const { |
| return !(storage_.a.has_value()); |
| } |
| |
| const std::optional<uint16_t>& a() const { return storage_.a; } |
| ::std::optional<uint16_t>& a() { return storage_.a; } |
| |
| // Setter for a. |
| // |
| |
| ComposedProtocolOneWayAnonComposedRequest& a(std::optional<uint16_t> value); |
| |
| ComposedProtocolOneWayAnonComposedRequest(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag); |
| |
| private: |
| struct Storage_ final { |
| ::std::optional<uint16_t> a; |
| }; |
| |
| // TODO(https://fxbug.dev/42172795): Box the storage. |
| Storage_ storage_; |
| Storage_ CloneStorage_() const; |
| friend struct ::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolOneWayAnonComposedRequest>; |
| friend struct ::fidl::internal::MemberVisitor<::test_protocollayoutssamelibrary::ComposedProtocolOneWayAnonComposedRequest>; |
| static constexpr auto kMembers = std::make_tuple(::fidl::internal::NaturalTableMember<Storage_, uint16_t, fidl::internal::NaturalCodingConstraintEmpty>{ |
| 1, &Storage_::a}); |
| }; |
| |
| class ComposedProtocolTwoWayAnonComposedRequest { |
| private: |
| using Storage_ = |
| std::variant< |
| std::monostate, bool>; |
| |
| public: |
| // TODO: share union tag types between wire & natural. |
| enum class Tag : fidl_xunion_tag_t { |
| kB = 1, // 0x1 |
| }; |
| |
| ComposedProtocolTwoWayAnonComposedRequest(ComposedProtocolTwoWayAnonComposedRequest&& other) noexcept |
| : ComposedProtocolTwoWayAnonComposedRequest(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag{}) { |
| *storage_ = std::move(*other.storage_); |
| } |
| ComposedProtocolTwoWayAnonComposedRequest& operator=(ComposedProtocolTwoWayAnonComposedRequest&& other) noexcept { |
| if (this != &other) { |
| *storage_ = std::move(*other.storage_); |
| } |
| return *this; |
| } |
| ComposedProtocolTwoWayAnonComposedRequest(const ComposedProtocolTwoWayAnonComposedRequest& other) noexcept : ComposedProtocolTwoWayAnonComposedRequest(other.CloneStorage_()) {} |
| ComposedProtocolTwoWayAnonComposedRequest& operator=(const ComposedProtocolTwoWayAnonComposedRequest& other) noexcept { |
| if (this != &other) { |
| storage_ = other.CloneStorage_(); |
| } |
| return *this; |
| } |
| |
| bool operator==(const ComposedProtocolTwoWayAnonComposedRequest& other) const noexcept { |
| return *storage_ == *other.storage_; |
| } |
| bool operator!=(const ComposedProtocolTwoWayAnonComposedRequest& other) const noexcept { |
| return *storage_ != *other.storage_; |
| } |
| |
| constexpr ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedRequest::Tag Which() const { |
| return ComposedProtocolTwoWayAnonComposedRequest::IndexToTag(storage_->index()).value(); |
| } |
| static ComposedProtocolTwoWayAnonComposedRequest WithB(bool val) { |
| return ComposedProtocolTwoWayAnonComposedRequest(std::make_shared<Storage_>( |
| std::in_place_index_t<1>{}, |
| std::move(val))); |
| } |
| |
| const ::fidl::internal::UnionMemberView<1, Storage_> b() const { |
| return ::fidl::internal::UnionMemberView<1, Storage_>(storage_); |
| } |
| |
| ::fidl::internal::UnionMemberView<1, Storage_> b() { |
| return ::fidl::internal::UnionMemberView<1, Storage_>(storage_); |
| } |
| |
| // Sets the union to hold the b member. |
| // |
| |
| ComposedProtocolTwoWayAnonComposedRequest& b(bool value) { |
| storage_->emplace<1>(std::move(value)); |
| return *this; |
| } |
| |
| ComposedProtocolTwoWayAnonComposedRequest(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) |
| : storage_(std::make_shared<Storage_>()) {} |
| |
| private: |
| std::shared_ptr<Storage_> storage_; |
| std::shared_ptr<Storage_> CloneStorage_() const; |
| friend struct ::fidl::internal::NaturalUnionCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedRequest>; |
| static constexpr auto kMembers = std::make_tuple( |
| ::fidl::internal::NaturalUnionMember<::fidl::internal::NaturalCodingConstraintEmpty>(), ::fidl::internal::NaturalUnionMember<fidl::internal::NaturalCodingConstraintEmpty>()); |
| |
| explicit ComposedProtocolTwoWayAnonComposedRequest(std::shared_ptr<Storage_> storage) : storage_(std::move(storage)) {} |
| |
| static constexpr size_t TagToIndex(::fidl::internal::NaturalDecoder* decoder, ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedRequest::Tag tag) { |
| switch (tag) { |
| case ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedRequest::Tag::kB: |
| return 1; |
| default: { |
| decoder->SetError(::fidl::internal::kCodingErrorUnknownUnionTag); |
| return 0; |
| } |
| } |
| } |
| |
| static constexpr std::optional<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedRequest::Tag> IndexToTag(size_t index) { |
| switch (index) { |
| case 1: |
| return ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedRequest::Tag::kB; |
| default: |
| return std::nullopt; |
| } |
| } |
| }; |
| |
| class ComposedProtocolTwoWayAnonComposedResponse { |
| private: |
| struct Storage_; |
| |
| public: |
| ComposedProtocolTwoWayAnonComposedResponse(Storage_ storage) noexcept; |
| ComposedProtocolTwoWayAnonComposedResponse() noexcept = default; |
| ComposedProtocolTwoWayAnonComposedResponse(ComposedProtocolTwoWayAnonComposedResponse&&) noexcept = default; |
| ComposedProtocolTwoWayAnonComposedResponse& operator=(ComposedProtocolTwoWayAnonComposedResponse&&) noexcept = default; |
| ComposedProtocolTwoWayAnonComposedResponse(const ComposedProtocolTwoWayAnonComposedResponse& other) noexcept; |
| ComposedProtocolTwoWayAnonComposedResponse& operator=(const ComposedProtocolTwoWayAnonComposedResponse& other) noexcept; |
| bool operator==(const ComposedProtocolTwoWayAnonComposedResponse& other) const noexcept { |
| return ::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedResponse>::Equal(this, &other); |
| } |
| bool operator!=(const ComposedProtocolTwoWayAnonComposedResponse& other) const noexcept { |
| return !::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedResponse>::Equal(this, &other); |
| } |
| |
| bool IsEmpty() const { |
| return !(storage_.a.has_value()); |
| } |
| |
| const std::optional<uint16_t>& a() const { return storage_.a; } |
| ::std::optional<uint16_t>& a() { return storage_.a; } |
| |
| // Setter for a. |
| // |
| |
| ComposedProtocolTwoWayAnonComposedResponse& a(std::optional<uint16_t> value); |
| |
| ComposedProtocolTwoWayAnonComposedResponse(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag); |
| |
| private: |
| struct Storage_ final { |
| ::std::optional<uint16_t> a; |
| }; |
| |
| // TODO(https://fxbug.dev/42172795): Box the storage. |
| Storage_ storage_; |
| Storage_ CloneStorage_() const; |
| friend struct ::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedResponse>; |
| friend struct ::fidl::internal::MemberVisitor<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedResponse>; |
| static constexpr auto kMembers = std::make_tuple(::fidl::internal::NaturalTableMember<Storage_, uint16_t, fidl::internal::NaturalCodingConstraintEmpty>{ |
| 1, &Storage_::a}); |
| }; |
| |
| class ComposedProtocolTwoWayAnonComposedWithErrorRequest { |
| private: |
| struct Storage_; |
| |
| public: |
| ComposedProtocolTwoWayAnonComposedWithErrorRequest(Storage_ storage) noexcept; |
| ComposedProtocolTwoWayAnonComposedWithErrorRequest() noexcept = default; |
| ComposedProtocolTwoWayAnonComposedWithErrorRequest(ComposedProtocolTwoWayAnonComposedWithErrorRequest&&) noexcept = default; |
| ComposedProtocolTwoWayAnonComposedWithErrorRequest& operator=(ComposedProtocolTwoWayAnonComposedWithErrorRequest&&) noexcept = default; |
| ComposedProtocolTwoWayAnonComposedWithErrorRequest(const ComposedProtocolTwoWayAnonComposedWithErrorRequest& other) noexcept; |
| ComposedProtocolTwoWayAnonComposedWithErrorRequest& operator=(const ComposedProtocolTwoWayAnonComposedWithErrorRequest& other) noexcept; |
| bool operator==(const ComposedProtocolTwoWayAnonComposedWithErrorRequest& other) const noexcept { |
| return ::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorRequest>::Equal(this, &other); |
| } |
| bool operator!=(const ComposedProtocolTwoWayAnonComposedWithErrorRequest& other) const noexcept { |
| return !::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorRequest>::Equal(this, &other); |
| } |
| |
| bool IsEmpty() const { |
| return !(storage_.a.has_value()); |
| } |
| |
| const std::optional<uint16_t>& a() const { return storage_.a; } |
| ::std::optional<uint16_t>& a() { return storage_.a; } |
| |
| // Setter for a. |
| // |
| |
| ComposedProtocolTwoWayAnonComposedWithErrorRequest& a(std::optional<uint16_t> value); |
| |
| ComposedProtocolTwoWayAnonComposedWithErrorRequest(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag); |
| |
| private: |
| struct Storage_ final { |
| ::std::optional<uint16_t> a; |
| }; |
| |
| // TODO(https://fxbug.dev/42172795): Box the storage. |
| Storage_ storage_; |
| Storage_ CloneStorage_() const; |
| friend struct ::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorRequest>; |
| friend struct ::fidl::internal::MemberVisitor<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorRequest>; |
| static constexpr auto kMembers = std::make_tuple(::fidl::internal::NaturalTableMember<Storage_, uint16_t, fidl::internal::NaturalCodingConstraintEmpty>{ |
| 1, &Storage_::a}); |
| }; |
| |
| class ComposedProtocolTwoWayAnonComposedWithErrorResponse { |
| private: |
| using Storage_ = |
| std::variant< |
| std::monostate, bool>; |
| |
| public: |
| // TODO: share union tag types between wire & natural. |
| enum class Tag : fidl_xunion_tag_t { |
| kB = 1, // 0x1 |
| }; |
| |
| ComposedProtocolTwoWayAnonComposedWithErrorResponse(ComposedProtocolTwoWayAnonComposedWithErrorResponse&& other) noexcept |
| : ComposedProtocolTwoWayAnonComposedWithErrorResponse(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag{}) { |
| *storage_ = std::move(*other.storage_); |
| } |
| ComposedProtocolTwoWayAnonComposedWithErrorResponse& operator=(ComposedProtocolTwoWayAnonComposedWithErrorResponse&& other) noexcept { |
| if (this != &other) { |
| *storage_ = std::move(*other.storage_); |
| } |
| return *this; |
| } |
| ComposedProtocolTwoWayAnonComposedWithErrorResponse(const ComposedProtocolTwoWayAnonComposedWithErrorResponse& other) noexcept : ComposedProtocolTwoWayAnonComposedWithErrorResponse(other.CloneStorage_()) {} |
| ComposedProtocolTwoWayAnonComposedWithErrorResponse& operator=(const ComposedProtocolTwoWayAnonComposedWithErrorResponse& other) noexcept { |
| if (this != &other) { |
| storage_ = other.CloneStorage_(); |
| } |
| return *this; |
| } |
| |
| bool operator==(const ComposedProtocolTwoWayAnonComposedWithErrorResponse& other) const noexcept { |
| return *storage_ == *other.storage_; |
| } |
| bool operator!=(const ComposedProtocolTwoWayAnonComposedWithErrorResponse& other) const noexcept { |
| return *storage_ != *other.storage_; |
| } |
| |
| constexpr ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResponse::Tag Which() const { |
| return ComposedProtocolTwoWayAnonComposedWithErrorResponse::IndexToTag(storage_->index()).value(); |
| } |
| static ComposedProtocolTwoWayAnonComposedWithErrorResponse WithB(bool val) { |
| return ComposedProtocolTwoWayAnonComposedWithErrorResponse(std::make_shared<Storage_>( |
| std::in_place_index_t<1>{}, |
| std::move(val))); |
| } |
| |
| const ::fidl::internal::UnionMemberView<1, Storage_> b() const { |
| return ::fidl::internal::UnionMemberView<1, Storage_>(storage_); |
| } |
| |
| ::fidl::internal::UnionMemberView<1, Storage_> b() { |
| return ::fidl::internal::UnionMemberView<1, Storage_>(storage_); |
| } |
| |
| // Sets the union to hold the b member. |
| // |
| |
| ComposedProtocolTwoWayAnonComposedWithErrorResponse& b(bool value) { |
| storage_->emplace<1>(std::move(value)); |
| return *this; |
| } |
| |
| ComposedProtocolTwoWayAnonComposedWithErrorResponse(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) |
| : storage_(std::make_shared<Storage_>()) {} |
| |
| private: |
| std::shared_ptr<Storage_> storage_; |
| std::shared_ptr<Storage_> CloneStorage_() const; |
| friend struct ::fidl::internal::NaturalUnionCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResponse>; |
| static constexpr auto kMembers = std::make_tuple( |
| ::fidl::internal::NaturalUnionMember<::fidl::internal::NaturalCodingConstraintEmpty>(), ::fidl::internal::NaturalUnionMember<fidl::internal::NaturalCodingConstraintEmpty>()); |
| |
| explicit ComposedProtocolTwoWayAnonComposedWithErrorResponse(std::shared_ptr<Storage_> storage) : storage_(std::move(storage)) {} |
| |
| static constexpr size_t TagToIndex(::fidl::internal::NaturalDecoder* decoder, ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResponse::Tag tag) { |
| switch (tag) { |
| case ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResponse::Tag::kB: |
| return 1; |
| default: { |
| decoder->SetError(::fidl::internal::kCodingErrorUnknownUnionTag); |
| return 0; |
| } |
| } |
| } |
| |
| static constexpr std::optional<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResponse::Tag> IndexToTag(size_t index) { |
| switch (index) { |
| case 1: |
| return ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResponse::Tag::kB; |
| default: |
| return std::nullopt; |
| } |
| } |
| }; |
| |
| class ComposedProtocolTwoWayAnonComposedWithErrorResult { |
| private: |
| using Storage_ = |
| std::variant< |
| std::monostate, ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResponse, uint32_t>; |
| |
| public: |
| // TODO: share union tag types between wire & natural. |
| enum class Tag : fidl_xunion_tag_t { |
| kResponse = 1, // 0x1 |
| kErr = 2, // 0x2 |
| }; |
| |
| ComposedProtocolTwoWayAnonComposedWithErrorResult(ComposedProtocolTwoWayAnonComposedWithErrorResult&& other) noexcept |
| : ComposedProtocolTwoWayAnonComposedWithErrorResult(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag{}) { |
| *storage_ = std::move(*other.storage_); |
| } |
| ComposedProtocolTwoWayAnonComposedWithErrorResult& operator=(ComposedProtocolTwoWayAnonComposedWithErrorResult&& other) noexcept { |
| if (this != &other) { |
| *storage_ = std::move(*other.storage_); |
| } |
| return *this; |
| } |
| ComposedProtocolTwoWayAnonComposedWithErrorResult(const ComposedProtocolTwoWayAnonComposedWithErrorResult& other) noexcept : ComposedProtocolTwoWayAnonComposedWithErrorResult(other.CloneStorage_()) {} |
| ComposedProtocolTwoWayAnonComposedWithErrorResult& operator=(const ComposedProtocolTwoWayAnonComposedWithErrorResult& other) noexcept { |
| if (this != &other) { |
| storage_ = other.CloneStorage_(); |
| } |
| return *this; |
| } |
| |
| bool operator==(const ComposedProtocolTwoWayAnonComposedWithErrorResult& other) const noexcept { |
| return *storage_ == *other.storage_; |
| } |
| bool operator!=(const ComposedProtocolTwoWayAnonComposedWithErrorResult& other) const noexcept { |
| return *storage_ != *other.storage_; |
| } |
| |
| constexpr ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResult::Tag Which() const { |
| return ComposedProtocolTwoWayAnonComposedWithErrorResult::IndexToTag(storage_->index()).value(); |
| } |
| static ComposedProtocolTwoWayAnonComposedWithErrorResult WithResponse(::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResponse val) { |
| return ComposedProtocolTwoWayAnonComposedWithErrorResult(std::make_shared<Storage_>( |
| std::in_place_index_t<1>{}, |
| std::move(val))); |
| } |
| |
| const ::fidl::internal::UnionMemberView<1, Storage_> response() const { |
| return ::fidl::internal::UnionMemberView<1, Storage_>(storage_); |
| } |
| |
| ::fidl::internal::UnionMemberView<1, Storage_> response() { |
| return ::fidl::internal::UnionMemberView<1, Storage_>(storage_); |
| } |
| |
| // Sets the union to hold the response member. |
| // |
| |
| ComposedProtocolTwoWayAnonComposedWithErrorResult& response(::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResponse value) { |
| storage_->emplace<1>(std::move(value)); |
| return *this; |
| } |
| static ComposedProtocolTwoWayAnonComposedWithErrorResult WithErr(uint32_t val) { |
| return ComposedProtocolTwoWayAnonComposedWithErrorResult(std::make_shared<Storage_>( |
| std::in_place_index_t<2>{}, |
| std::move(val))); |
| } |
| |
| const ::fidl::internal::UnionMemberView<2, Storage_> err() const { |
| return ::fidl::internal::UnionMemberView<2, Storage_>(storage_); |
| } |
| |
| ::fidl::internal::UnionMemberView<2, Storage_> err() { |
| return ::fidl::internal::UnionMemberView<2, Storage_>(storage_); |
| } |
| |
| // Sets the union to hold the err member. |
| // |
| |
| ComposedProtocolTwoWayAnonComposedWithErrorResult& err(uint32_t value) { |
| storage_->emplace<2>(std::move(value)); |
| return *this; |
| } |
| |
| ComposedProtocolTwoWayAnonComposedWithErrorResult(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) |
| : storage_(std::make_shared<Storage_>()) {} |
| |
| private: |
| std::shared_ptr<Storage_> storage_; |
| std::shared_ptr<Storage_> CloneStorage_() const; |
| friend struct ::fidl::internal::NaturalUnionCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResult>; |
| static constexpr auto kMembers = std::make_tuple( |
| ::fidl::internal::NaturalUnionMember<::fidl::internal::NaturalCodingConstraintEmpty>(), ::fidl::internal::NaturalUnionMember<fidl::internal::NaturalCodingConstraintEmpty>(), ::fidl::internal::NaturalUnionMember<fidl::internal::NaturalCodingConstraintEmpty>()); |
| |
| explicit ComposedProtocolTwoWayAnonComposedWithErrorResult(std::shared_ptr<Storage_> storage) : storage_(std::move(storage)) {} |
| |
| static constexpr size_t TagToIndex(::fidl::internal::NaturalDecoder* decoder, ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResult::Tag tag) { |
| switch (tag) { |
| case ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResult::Tag::kResponse: |
| return 1; |
| case ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResult::Tag::kErr: |
| return 2; |
| default: { |
| decoder->SetError(::fidl::internal::kCodingErrorUnknownUnionTag); |
| return 0; |
| } |
| } |
| } |
| |
| static constexpr std::optional<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResult::Tag> IndexToTag(size_t index) { |
| switch (index) { |
| case 1: |
| return ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResult::Tag::kResponse; |
| case 2: |
| return ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResult::Tag::kErr; |
| default: |
| return std::nullopt; |
| } |
| } |
| }; |
| |
| class ComposedProtocolOnAnonComposedRequest { |
| private: |
| using Storage_ = |
| std::variant< |
| std::monostate, bool>; |
| |
| public: |
| // TODO: share union tag types between wire & natural. |
| enum class Tag : fidl_xunion_tag_t { |
| kB = 1, // 0x1 |
| }; |
| |
| ComposedProtocolOnAnonComposedRequest(ComposedProtocolOnAnonComposedRequest&& other) noexcept |
| : ComposedProtocolOnAnonComposedRequest(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag{}) { |
| *storage_ = std::move(*other.storage_); |
| } |
| ComposedProtocolOnAnonComposedRequest& operator=(ComposedProtocolOnAnonComposedRequest&& other) noexcept { |
| if (this != &other) { |
| *storage_ = std::move(*other.storage_); |
| } |
| return *this; |
| } |
| ComposedProtocolOnAnonComposedRequest(const ComposedProtocolOnAnonComposedRequest& other) noexcept : ComposedProtocolOnAnonComposedRequest(other.CloneStorage_()) {} |
| ComposedProtocolOnAnonComposedRequest& operator=(const ComposedProtocolOnAnonComposedRequest& other) noexcept { |
| if (this != &other) { |
| storage_ = other.CloneStorage_(); |
| } |
| return *this; |
| } |
| |
| bool operator==(const ComposedProtocolOnAnonComposedRequest& other) const noexcept { |
| return *storage_ == *other.storage_; |
| } |
| bool operator!=(const ComposedProtocolOnAnonComposedRequest& other) const noexcept { |
| return *storage_ != *other.storage_; |
| } |
| |
| constexpr ::test_protocollayoutssamelibrary::ComposedProtocolOnAnonComposedRequest::Tag Which() const { |
| return ComposedProtocolOnAnonComposedRequest::IndexToTag(storage_->index()).value(); |
| } |
| static ComposedProtocolOnAnonComposedRequest WithB(bool val) { |
| return ComposedProtocolOnAnonComposedRequest(std::make_shared<Storage_>( |
| std::in_place_index_t<1>{}, |
| std::move(val))); |
| } |
| |
| const ::fidl::internal::UnionMemberView<1, Storage_> b() const { |
| return ::fidl::internal::UnionMemberView<1, Storage_>(storage_); |
| } |
| |
| ::fidl::internal::UnionMemberView<1, Storage_> b() { |
| return ::fidl::internal::UnionMemberView<1, Storage_>(storage_); |
| } |
| |
| // Sets the union to hold the b member. |
| // |
| |
| ComposedProtocolOnAnonComposedRequest& b(bool value) { |
| storage_->emplace<1>(std::move(value)); |
| return *this; |
| } |
| |
| ComposedProtocolOnAnonComposedRequest(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) |
| : storage_(std::make_shared<Storage_>()) {} |
| |
| private: |
| std::shared_ptr<Storage_> storage_; |
| std::shared_ptr<Storage_> CloneStorage_() const; |
| friend struct ::fidl::internal::NaturalUnionCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolOnAnonComposedRequest>; |
| static constexpr auto kMembers = std::make_tuple( |
| ::fidl::internal::NaturalUnionMember<::fidl::internal::NaturalCodingConstraintEmpty>(), ::fidl::internal::NaturalUnionMember<fidl::internal::NaturalCodingConstraintEmpty>()); |
| |
| explicit ComposedProtocolOnAnonComposedRequest(std::shared_ptr<Storage_> storage) : storage_(std::move(storage)) {} |
| |
| static constexpr size_t TagToIndex(::fidl::internal::NaturalDecoder* decoder, ::test_protocollayoutssamelibrary::ComposedProtocolOnAnonComposedRequest::Tag tag) { |
| switch (tag) { |
| case ::test_protocollayoutssamelibrary::ComposedProtocolOnAnonComposedRequest::Tag::kB: |
| return 1; |
| default: { |
| decoder->SetError(::fidl::internal::kCodingErrorUnknownUnionTag); |
| return 0; |
| } |
| } |
| } |
| |
| static constexpr std::optional<::test_protocollayoutssamelibrary::ComposedProtocolOnAnonComposedRequest::Tag> IndexToTag(size_t index) { |
| switch (index) { |
| case 1: |
| return ::test_protocollayoutssamelibrary::ComposedProtocolOnAnonComposedRequest::Tag::kB; |
| default: |
| return std::nullopt; |
| } |
| } |
| }; |
| |
| class ComposedProtocolTwoWayNamedComposedWithErrorResult { |
| private: |
| using Storage_ = |
| std::variant< |
| std::monostate, ::test_protocollayoutssamelibrary::UnionPayload, uint32_t>; |
| |
| public: |
| // TODO: share union tag types between wire & natural. |
| enum class Tag : fidl_xunion_tag_t { |
| kResponse = 1, // 0x1 |
| kErr = 2, // 0x2 |
| }; |
| |
| ComposedProtocolTwoWayNamedComposedWithErrorResult(ComposedProtocolTwoWayNamedComposedWithErrorResult&& other) noexcept |
| : ComposedProtocolTwoWayNamedComposedWithErrorResult(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag{}) { |
| *storage_ = std::move(*other.storage_); |
| } |
| ComposedProtocolTwoWayNamedComposedWithErrorResult& operator=(ComposedProtocolTwoWayNamedComposedWithErrorResult&& other) noexcept { |
| if (this != &other) { |
| *storage_ = std::move(*other.storage_); |
| } |
| return *this; |
| } |
| ComposedProtocolTwoWayNamedComposedWithErrorResult(const ComposedProtocolTwoWayNamedComposedWithErrorResult& other) noexcept : ComposedProtocolTwoWayNamedComposedWithErrorResult(other.CloneStorage_()) {} |
| ComposedProtocolTwoWayNamedComposedWithErrorResult& operator=(const ComposedProtocolTwoWayNamedComposedWithErrorResult& other) noexcept { |
| if (this != &other) { |
| storage_ = other.CloneStorage_(); |
| } |
| return *this; |
| } |
| |
| bool operator==(const ComposedProtocolTwoWayNamedComposedWithErrorResult& other) const noexcept { |
| return *storage_ == *other.storage_; |
| } |
| bool operator!=(const ComposedProtocolTwoWayNamedComposedWithErrorResult& other) const noexcept { |
| return *storage_ != *other.storage_; |
| } |
| |
| constexpr ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayNamedComposedWithErrorResult::Tag Which() const { |
| return ComposedProtocolTwoWayNamedComposedWithErrorResult::IndexToTag(storage_->index()).value(); |
| } |
| static ComposedProtocolTwoWayNamedComposedWithErrorResult WithResponse(::test_protocollayoutssamelibrary::UnionPayload val) { |
| return ComposedProtocolTwoWayNamedComposedWithErrorResult(std::make_shared<Storage_>( |
| std::in_place_index_t<1>{}, |
| std::move(val))); |
| } |
| |
| const ::fidl::internal::UnionMemberView<1, Storage_> response() const { |
| return ::fidl::internal::UnionMemberView<1, Storage_>(storage_); |
| } |
| |
| ::fidl::internal::UnionMemberView<1, Storage_> response() { |
| return ::fidl::internal::UnionMemberView<1, Storage_>(storage_); |
| } |
| |
| // Sets the union to hold the response member. |
| // |
| |
| ComposedProtocolTwoWayNamedComposedWithErrorResult& response(::test_protocollayoutssamelibrary::UnionPayload value) { |
| storage_->emplace<1>(std::move(value)); |
| return *this; |
| } |
| static ComposedProtocolTwoWayNamedComposedWithErrorResult WithErr(uint32_t val) { |
| return ComposedProtocolTwoWayNamedComposedWithErrorResult(std::make_shared<Storage_>( |
| std::in_place_index_t<2>{}, |
| std::move(val))); |
| } |
| |
| const ::fidl::internal::UnionMemberView<2, Storage_> err() const { |
| return ::fidl::internal::UnionMemberView<2, Storage_>(storage_); |
| } |
| |
| ::fidl::internal::UnionMemberView<2, Storage_> err() { |
| return ::fidl::internal::UnionMemberView<2, Storage_>(storage_); |
| } |
| |
| // Sets the union to hold the err member. |
| // |
| |
| ComposedProtocolTwoWayNamedComposedWithErrorResult& err(uint32_t value) { |
| storage_->emplace<2>(std::move(value)); |
| return *this; |
| } |
| |
| ComposedProtocolTwoWayNamedComposedWithErrorResult(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) |
| : storage_(std::make_shared<Storage_>()) {} |
| |
| private: |
| std::shared_ptr<Storage_> storage_; |
| std::shared_ptr<Storage_> CloneStorage_() const; |
| friend struct ::fidl::internal::NaturalUnionCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayNamedComposedWithErrorResult>; |
| static constexpr auto kMembers = std::make_tuple( |
| ::fidl::internal::NaturalUnionMember<::fidl::internal::NaturalCodingConstraintEmpty>(), ::fidl::internal::NaturalUnionMember<fidl::internal::NaturalCodingConstraintEmpty>(), ::fidl::internal::NaturalUnionMember<fidl::internal::NaturalCodingConstraintEmpty>()); |
| |
| explicit ComposedProtocolTwoWayNamedComposedWithErrorResult(std::shared_ptr<Storage_> storage) : storage_(std::move(storage)) {} |
| |
| static constexpr size_t TagToIndex(::fidl::internal::NaturalDecoder* decoder, ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayNamedComposedWithErrorResult::Tag tag) { |
| switch (tag) { |
| case ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayNamedComposedWithErrorResult::Tag::kResponse: |
| return 1; |
| case ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayNamedComposedWithErrorResult::Tag::kErr: |
| return 2; |
| default: { |
| decoder->SetError(::fidl::internal::kCodingErrorUnknownUnionTag); |
| return 0; |
| } |
| } |
| } |
| |
| static constexpr std::optional<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayNamedComposedWithErrorResult::Tag> IndexToTag(size_t index) { |
| switch (index) { |
| case 1: |
| return ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayNamedComposedWithErrorResult::Tag::kResponse; |
| case 2: |
| return ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayNamedComposedWithErrorResult::Tag::kErr; |
| default: |
| return std::nullopt; |
| } |
| } |
| }; |
| |
| class MainProtocolTwoWayLocalWithErrorResult { |
| private: |
| using Storage_ = |
| std::variant< |
| std::monostate, ::test_protocollayoutssamelibrary::UnionPayload, uint32_t>; |
| |
| public: |
| // TODO: share union tag types between wire & natural. |
| enum class Tag : fidl_xunion_tag_t { |
| kResponse = 1, // 0x1 |
| kErr = 2, // 0x2 |
| }; |
| |
| MainProtocolTwoWayLocalWithErrorResult(MainProtocolTwoWayLocalWithErrorResult&& other) noexcept |
| : MainProtocolTwoWayLocalWithErrorResult(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag{}) { |
| *storage_ = std::move(*other.storage_); |
| } |
| MainProtocolTwoWayLocalWithErrorResult& operator=(MainProtocolTwoWayLocalWithErrorResult&& other) noexcept { |
| if (this != &other) { |
| *storage_ = std::move(*other.storage_); |
| } |
| return *this; |
| } |
| MainProtocolTwoWayLocalWithErrorResult(const MainProtocolTwoWayLocalWithErrorResult& other) noexcept : MainProtocolTwoWayLocalWithErrorResult(other.CloneStorage_()) {} |
| MainProtocolTwoWayLocalWithErrorResult& operator=(const MainProtocolTwoWayLocalWithErrorResult& other) noexcept { |
| if (this != &other) { |
| storage_ = other.CloneStorage_(); |
| } |
| return *this; |
| } |
| |
| bool operator==(const MainProtocolTwoWayLocalWithErrorResult& other) const noexcept { |
| return *storage_ == *other.storage_; |
| } |
| bool operator!=(const MainProtocolTwoWayLocalWithErrorResult& other) const noexcept { |
| return *storage_ != *other.storage_; |
| } |
| |
| constexpr ::test_protocollayoutssamelibrary::MainProtocolTwoWayLocalWithErrorResult::Tag Which() const { |
| return MainProtocolTwoWayLocalWithErrorResult::IndexToTag(storage_->index()).value(); |
| } |
| static MainProtocolTwoWayLocalWithErrorResult WithResponse(::test_protocollayoutssamelibrary::UnionPayload val) { |
| return MainProtocolTwoWayLocalWithErrorResult(std::make_shared<Storage_>( |
| std::in_place_index_t<1>{}, |
| std::move(val))); |
| } |
| |
| const ::fidl::internal::UnionMemberView<1, Storage_> response() const { |
| return ::fidl::internal::UnionMemberView<1, Storage_>(storage_); |
| } |
| |
| ::fidl::internal::UnionMemberView<1, Storage_> response() { |
| return ::fidl::internal::UnionMemberView<1, Storage_>(storage_); |
| } |
| |
| // Sets the union to hold the response member. |
| // |
| |
| MainProtocolTwoWayLocalWithErrorResult& response(::test_protocollayoutssamelibrary::UnionPayload value) { |
| storage_->emplace<1>(std::move(value)); |
| return *this; |
| } |
| static MainProtocolTwoWayLocalWithErrorResult WithErr(uint32_t val) { |
| return MainProtocolTwoWayLocalWithErrorResult(std::make_shared<Storage_>( |
| std::in_place_index_t<2>{}, |
| std::move(val))); |
| } |
| |
| const ::fidl::internal::UnionMemberView<2, Storage_> err() const { |
| return ::fidl::internal::UnionMemberView<2, Storage_>(storage_); |
| } |
| |
| ::fidl::internal::UnionMemberView<2, Storage_> err() { |
| return ::fidl::internal::UnionMemberView<2, Storage_>(storage_); |
| } |
| |
| // Sets the union to hold the err member. |
| // |
| |
| MainProtocolTwoWayLocalWithErrorResult& err(uint32_t value) { |
| storage_->emplace<2>(std::move(value)); |
| return *this; |
| } |
| |
| MainProtocolTwoWayLocalWithErrorResult(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) |
| : storage_(std::make_shared<Storage_>()) {} |
| |
| private: |
| std::shared_ptr<Storage_> storage_; |
| std::shared_ptr<Storage_> CloneStorage_() const; |
| friend struct ::fidl::internal::NaturalUnionCodingTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayLocalWithErrorResult>; |
| static constexpr auto kMembers = std::make_tuple( |
| ::fidl::internal::NaturalUnionMember<::fidl::internal::NaturalCodingConstraintEmpty>(), ::fidl::internal::NaturalUnionMember<fidl::internal::NaturalCodingConstraintEmpty>(), ::fidl::internal::NaturalUnionMember<fidl::internal::NaturalCodingConstraintEmpty>()); |
| |
| explicit MainProtocolTwoWayLocalWithErrorResult(std::shared_ptr<Storage_> storage) : storage_(std::move(storage)) {} |
| |
| static constexpr size_t TagToIndex(::fidl::internal::NaturalDecoder* decoder, ::test_protocollayoutssamelibrary::MainProtocolTwoWayLocalWithErrorResult::Tag tag) { |
| switch (tag) { |
| case ::test_protocollayoutssamelibrary::MainProtocolTwoWayLocalWithErrorResult::Tag::kResponse: |
| return 1; |
| case ::test_protocollayoutssamelibrary::MainProtocolTwoWayLocalWithErrorResult::Tag::kErr: |
| return 2; |
| default: { |
| decoder->SetError(::fidl::internal::kCodingErrorUnknownUnionTag); |
| return 0; |
| } |
| } |
| } |
| |
| static constexpr std::optional<::test_protocollayoutssamelibrary::MainProtocolTwoWayLocalWithErrorResult::Tag> IndexToTag(size_t index) { |
| switch (index) { |
| case 1: |
| return ::test_protocollayoutssamelibrary::MainProtocolTwoWayLocalWithErrorResult::Tag::kResponse; |
| case 2: |
| return ::test_protocollayoutssamelibrary::MainProtocolTwoWayLocalWithErrorResult::Tag::kErr; |
| default: |
| return std::nullopt; |
| } |
| } |
| }; |
| |
| class MainProtocolOneWayAnonRequest { |
| private: |
| struct Storage_; |
| |
| public: |
| MainProtocolOneWayAnonRequest(Storage_ storage) noexcept; |
| MainProtocolOneWayAnonRequest() noexcept = default; |
| MainProtocolOneWayAnonRequest(MainProtocolOneWayAnonRequest&&) noexcept = default; |
| MainProtocolOneWayAnonRequest& operator=(MainProtocolOneWayAnonRequest&&) noexcept = default; |
| MainProtocolOneWayAnonRequest(const MainProtocolOneWayAnonRequest& other) noexcept; |
| MainProtocolOneWayAnonRequest& operator=(const MainProtocolOneWayAnonRequest& other) noexcept; |
| bool operator==(const MainProtocolOneWayAnonRequest& other) const noexcept { |
| return ::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::MainProtocolOneWayAnonRequest>::Equal(this, &other); |
| } |
| bool operator!=(const MainProtocolOneWayAnonRequest& other) const noexcept { |
| return !::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::MainProtocolOneWayAnonRequest>::Equal(this, &other); |
| } |
| |
| bool IsEmpty() const { |
| return !(storage_.a.has_value()); |
| } |
| |
| const std::optional<uint16_t>& a() const { return storage_.a; } |
| ::std::optional<uint16_t>& a() { return storage_.a; } |
| |
| // Setter for a. |
| // |
| |
| MainProtocolOneWayAnonRequest& a(std::optional<uint16_t> value); |
| |
| MainProtocolOneWayAnonRequest(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag); |
| |
| private: |
| struct Storage_ final { |
| ::std::optional<uint16_t> a; |
| }; |
| |
| // TODO(https://fxbug.dev/42172795): Box the storage. |
| Storage_ storage_; |
| Storage_ CloneStorage_() const; |
| friend struct ::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::MainProtocolOneWayAnonRequest>; |
| friend struct ::fidl::internal::MemberVisitor<::test_protocollayoutssamelibrary::MainProtocolOneWayAnonRequest>; |
| static constexpr auto kMembers = std::make_tuple(::fidl::internal::NaturalTableMember<Storage_, uint16_t, fidl::internal::NaturalCodingConstraintEmpty>{ |
| 1, &Storage_::a}); |
| }; |
| |
| class MainProtocolTwoWayAnonRequest { |
| private: |
| using Storage_ = |
| std::variant< |
| std::monostate, bool>; |
| |
| public: |
| // TODO: share union tag types between wire & natural. |
| enum class Tag : fidl_xunion_tag_t { |
| kB = 1, // 0x1 |
| _do_not_handle_this__write_a_default_case_instead = ::std::numeric_limits<::fidl_union_tag_t>::max(), |
| }; |
| |
| MainProtocolTwoWayAnonRequest(MainProtocolTwoWayAnonRequest&& other) noexcept |
| : MainProtocolTwoWayAnonRequest(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag{}) { |
| *storage_ = std::move(*other.storage_); |
| } |
| MainProtocolTwoWayAnonRequest& operator=(MainProtocolTwoWayAnonRequest&& other) noexcept { |
| if (this != &other) { |
| *storage_ = std::move(*other.storage_); |
| } |
| return *this; |
| } |
| MainProtocolTwoWayAnonRequest(const MainProtocolTwoWayAnonRequest& other) noexcept : MainProtocolTwoWayAnonRequest(other.CloneStorage_()) {} |
| MainProtocolTwoWayAnonRequest& operator=(const MainProtocolTwoWayAnonRequest& other) noexcept { |
| if (this != &other) { |
| storage_ = other.CloneStorage_(); |
| } |
| return *this; |
| } |
| |
| bool operator==(const MainProtocolTwoWayAnonRequest& other) const noexcept { |
| return *storage_ == *other.storage_; |
| } |
| bool operator!=(const MainProtocolTwoWayAnonRequest& other) const noexcept { |
| return *storage_ != *other.storage_; |
| } |
| constexpr bool IsUnknown() const { |
| return Which() == ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonRequest::Tag::_do_not_handle_this__write_a_default_case_instead; |
| } |
| |
| constexpr ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonRequest::Tag Which() const { |
| return MainProtocolTwoWayAnonRequest::IndexToTag(storage_->index()).value(); |
| } |
| static MainProtocolTwoWayAnonRequest WithB(bool val) { |
| return MainProtocolTwoWayAnonRequest(std::make_shared<Storage_>( |
| std::in_place_index_t<1>{}, |
| std::move(val))); |
| } |
| |
| const ::fidl::internal::UnionMemberView<1, Storage_> b() const { |
| return ::fidl::internal::UnionMemberView<1, Storage_>(storage_); |
| } |
| |
| ::fidl::internal::UnionMemberView<1, Storage_> b() { |
| return ::fidl::internal::UnionMemberView<1, Storage_>(storage_); |
| } |
| |
| // Sets the union to hold the b member. |
| // |
| |
| MainProtocolTwoWayAnonRequest& b(bool value) { |
| storage_->emplace<1>(std::move(value)); |
| return *this; |
| } |
| |
| MainProtocolTwoWayAnonRequest(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) |
| : storage_(std::make_shared<Storage_>()) {} |
| |
| private: |
| std::shared_ptr<Storage_> storage_; |
| std::shared_ptr<Storage_> CloneStorage_() const; |
| friend struct ::fidl::internal::NaturalUnionCodingTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonRequest>; |
| static constexpr auto kMembers = std::make_tuple( |
| ::fidl::internal::NaturalUnionMember<::fidl::internal::NaturalCodingConstraintEmpty>(), ::fidl::internal::NaturalUnionMember<fidl::internal::NaturalCodingConstraintEmpty>()); |
| |
| explicit MainProtocolTwoWayAnonRequest(std::shared_ptr<Storage_> storage) : storage_(std::move(storage)) {} |
| |
| static constexpr size_t TagToIndex(::fidl::internal::NaturalDecoder* decoder, ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonRequest::Tag tag) { |
| switch (tag) { |
| case ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonRequest::Tag::kB: |
| return 1; |
| default: { |
| return 0; |
| } |
| } |
| } |
| |
| static constexpr std::optional<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonRequest::Tag> IndexToTag(size_t index) { |
| switch (index) { |
| case 1: |
| return ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonRequest::Tag::kB; |
| default: |
| return ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonRequest::Tag::_do_not_handle_this__write_a_default_case_instead; |
| } |
| } |
| }; |
| |
| class MainProtocolTwoWayAnonResponse { |
| private: |
| struct Storage_; |
| |
| public: |
| MainProtocolTwoWayAnonResponse(Storage_ storage) noexcept; |
| MainProtocolTwoWayAnonResponse() noexcept = default; |
| MainProtocolTwoWayAnonResponse(MainProtocolTwoWayAnonResponse&&) noexcept = default; |
| MainProtocolTwoWayAnonResponse& operator=(MainProtocolTwoWayAnonResponse&&) noexcept = default; |
| MainProtocolTwoWayAnonResponse(const MainProtocolTwoWayAnonResponse& other) noexcept; |
| MainProtocolTwoWayAnonResponse& operator=(const MainProtocolTwoWayAnonResponse& other) noexcept; |
| bool operator==(const MainProtocolTwoWayAnonResponse& other) const noexcept { |
| return ::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonResponse>::Equal(this, &other); |
| } |
| bool operator!=(const MainProtocolTwoWayAnonResponse& other) const noexcept { |
| return !::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonResponse>::Equal(this, &other); |
| } |
| |
| bool IsEmpty() const { |
| return !(storage_.a.has_value()); |
| } |
| |
| const std::optional<uint16_t>& a() const { return storage_.a; } |
| ::std::optional<uint16_t>& a() { return storage_.a; } |
| |
| // Setter for a. |
| // |
| |
| MainProtocolTwoWayAnonResponse& a(std::optional<uint16_t> value); |
| |
| MainProtocolTwoWayAnonResponse(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag); |
| |
| private: |
| struct Storage_ final { |
| ::std::optional<uint16_t> a; |
| }; |
| |
| // TODO(https://fxbug.dev/42172795): Box the storage. |
| Storage_ storage_; |
| Storage_ CloneStorage_() const; |
| friend struct ::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonResponse>; |
| friend struct ::fidl::internal::MemberVisitor<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonResponse>; |
| static constexpr auto kMembers = std::make_tuple(::fidl::internal::NaturalTableMember<Storage_, uint16_t, fidl::internal::NaturalCodingConstraintEmpty>{ |
| 1, &Storage_::a}); |
| }; |
| |
| class MainProtocolTwoWayAnonWithErrorRequest { |
| private: |
| struct Storage_; |
| |
| public: |
| MainProtocolTwoWayAnonWithErrorRequest(Storage_ storage) noexcept; |
| MainProtocolTwoWayAnonWithErrorRequest() noexcept = default; |
| MainProtocolTwoWayAnonWithErrorRequest(MainProtocolTwoWayAnonWithErrorRequest&&) noexcept = default; |
| MainProtocolTwoWayAnonWithErrorRequest& operator=(MainProtocolTwoWayAnonWithErrorRequest&&) noexcept = default; |
| MainProtocolTwoWayAnonWithErrorRequest(const MainProtocolTwoWayAnonWithErrorRequest& other) noexcept; |
| MainProtocolTwoWayAnonWithErrorRequest& operator=(const MainProtocolTwoWayAnonWithErrorRequest& other) noexcept; |
| bool operator==(const MainProtocolTwoWayAnonWithErrorRequest& other) const noexcept { |
| return ::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorRequest>::Equal(this, &other); |
| } |
| bool operator!=(const MainProtocolTwoWayAnonWithErrorRequest& other) const noexcept { |
| return !::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorRequest>::Equal(this, &other); |
| } |
| |
| bool IsEmpty() const { |
| return !(storage_.a.has_value()); |
| } |
| |
| const std::optional<uint16_t>& a() const { return storage_.a; } |
| ::std::optional<uint16_t>& a() { return storage_.a; } |
| |
| // Setter for a. |
| // |
| |
| MainProtocolTwoWayAnonWithErrorRequest& a(std::optional<uint16_t> value); |
| |
| MainProtocolTwoWayAnonWithErrorRequest(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag); |
| |
| private: |
| struct Storage_ final { |
| ::std::optional<uint16_t> a; |
| }; |
| |
| // TODO(https://fxbug.dev/42172795): Box the storage. |
| Storage_ storage_; |
| Storage_ CloneStorage_() const; |
| friend struct ::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorRequest>; |
| friend struct ::fidl::internal::MemberVisitor<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorRequest>; |
| static constexpr auto kMembers = std::make_tuple(::fidl::internal::NaturalTableMember<Storage_, uint16_t, fidl::internal::NaturalCodingConstraintEmpty>{ |
| 1, &Storage_::a}); |
| }; |
| |
| class MainProtocolTwoWayAnonWithErrorResponse { |
| private: |
| using Storage_ = |
| std::variant< |
| std::monostate, bool>; |
| |
| public: |
| // TODO: share union tag types between wire & natural. |
| enum class Tag : fidl_xunion_tag_t { |
| kB = 1, // 0x1 |
| _do_not_handle_this__write_a_default_case_instead = ::std::numeric_limits<::fidl_union_tag_t>::max(), |
| }; |
| |
| MainProtocolTwoWayAnonWithErrorResponse(MainProtocolTwoWayAnonWithErrorResponse&& other) noexcept |
| : MainProtocolTwoWayAnonWithErrorResponse(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag{}) { |
| *storage_ = std::move(*other.storage_); |
| } |
| MainProtocolTwoWayAnonWithErrorResponse& operator=(MainProtocolTwoWayAnonWithErrorResponse&& other) noexcept { |
| if (this != &other) { |
| *storage_ = std::move(*other.storage_); |
| } |
| return *this; |
| } |
| MainProtocolTwoWayAnonWithErrorResponse(const MainProtocolTwoWayAnonWithErrorResponse& other) noexcept : MainProtocolTwoWayAnonWithErrorResponse(other.CloneStorage_()) {} |
| MainProtocolTwoWayAnonWithErrorResponse& operator=(const MainProtocolTwoWayAnonWithErrorResponse& other) noexcept { |
| if (this != &other) { |
| storage_ = other.CloneStorage_(); |
| } |
| return *this; |
| } |
| |
| bool operator==(const MainProtocolTwoWayAnonWithErrorResponse& other) const noexcept { |
| return *storage_ == *other.storage_; |
| } |
| bool operator!=(const MainProtocolTwoWayAnonWithErrorResponse& other) const noexcept { |
| return *storage_ != *other.storage_; |
| } |
| constexpr bool IsUnknown() const { |
| return Which() == ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResponse::Tag::_do_not_handle_this__write_a_default_case_instead; |
| } |
| |
| constexpr ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResponse::Tag Which() const { |
| return MainProtocolTwoWayAnonWithErrorResponse::IndexToTag(storage_->index()).value(); |
| } |
| static MainProtocolTwoWayAnonWithErrorResponse WithB(bool val) { |
| return MainProtocolTwoWayAnonWithErrorResponse(std::make_shared<Storage_>( |
| std::in_place_index_t<1>{}, |
| std::move(val))); |
| } |
| |
| const ::fidl::internal::UnionMemberView<1, Storage_> b() const { |
| return ::fidl::internal::UnionMemberView<1, Storage_>(storage_); |
| } |
| |
| ::fidl::internal::UnionMemberView<1, Storage_> b() { |
| return ::fidl::internal::UnionMemberView<1, Storage_>(storage_); |
| } |
| |
| // Sets the union to hold the b member. |
| // |
| |
| MainProtocolTwoWayAnonWithErrorResponse& b(bool value) { |
| storage_->emplace<1>(std::move(value)); |
| return *this; |
| } |
| |
| MainProtocolTwoWayAnonWithErrorResponse(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) |
| : storage_(std::make_shared<Storage_>()) {} |
| |
| private: |
| std::shared_ptr<Storage_> storage_; |
| std::shared_ptr<Storage_> CloneStorage_() const; |
| friend struct ::fidl::internal::NaturalUnionCodingTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResponse>; |
| static constexpr auto kMembers = std::make_tuple( |
| ::fidl::internal::NaturalUnionMember<::fidl::internal::NaturalCodingConstraintEmpty>(), ::fidl::internal::NaturalUnionMember<fidl::internal::NaturalCodingConstraintEmpty>()); |
| |
| explicit MainProtocolTwoWayAnonWithErrorResponse(std::shared_ptr<Storage_> storage) : storage_(std::move(storage)) {} |
| |
| static constexpr size_t TagToIndex(::fidl::internal::NaturalDecoder* decoder, ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResponse::Tag tag) { |
| switch (tag) { |
| case ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResponse::Tag::kB: |
| return 1; |
| default: { |
| return 0; |
| } |
| } |
| } |
| |
| static constexpr std::optional<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResponse::Tag> IndexToTag(size_t index) { |
| switch (index) { |
| case 1: |
| return ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResponse::Tag::kB; |
| default: |
| return ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResponse::Tag::_do_not_handle_this__write_a_default_case_instead; |
| } |
| } |
| }; |
| |
| class MainProtocolTwoWayAnonWithErrorResult { |
| private: |
| using Storage_ = |
| std::variant< |
| std::monostate, ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResponse, uint32_t>; |
| |
| public: |
| // TODO: share union tag types between wire & natural. |
| enum class Tag : fidl_xunion_tag_t { |
| kResponse = 1, // 0x1 |
| kErr = 2, // 0x2 |
| }; |
| |
| MainProtocolTwoWayAnonWithErrorResult(MainProtocolTwoWayAnonWithErrorResult&& other) noexcept |
| : MainProtocolTwoWayAnonWithErrorResult(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag{}) { |
| *storage_ = std::move(*other.storage_); |
| } |
| MainProtocolTwoWayAnonWithErrorResult& operator=(MainProtocolTwoWayAnonWithErrorResult&& other) noexcept { |
| if (this != &other) { |
| *storage_ = std::move(*other.storage_); |
| } |
| return *this; |
| } |
| MainProtocolTwoWayAnonWithErrorResult(const MainProtocolTwoWayAnonWithErrorResult& other) noexcept : MainProtocolTwoWayAnonWithErrorResult(other.CloneStorage_()) {} |
| MainProtocolTwoWayAnonWithErrorResult& operator=(const MainProtocolTwoWayAnonWithErrorResult& other) noexcept { |
| if (this != &other) { |
| storage_ = other.CloneStorage_(); |
| } |
| return *this; |
| } |
| |
| bool operator==(const MainProtocolTwoWayAnonWithErrorResult& other) const noexcept { |
| return *storage_ == *other.storage_; |
| } |
| bool operator!=(const MainProtocolTwoWayAnonWithErrorResult& other) const noexcept { |
| return *storage_ != *other.storage_; |
| } |
| |
| constexpr ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResult::Tag Which() const { |
| return MainProtocolTwoWayAnonWithErrorResult::IndexToTag(storage_->index()).value(); |
| } |
| static MainProtocolTwoWayAnonWithErrorResult WithResponse(::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResponse val) { |
| return MainProtocolTwoWayAnonWithErrorResult(std::make_shared<Storage_>( |
| std::in_place_index_t<1>{}, |
| std::move(val))); |
| } |
| |
| const ::fidl::internal::UnionMemberView<1, Storage_> response() const { |
| return ::fidl::internal::UnionMemberView<1, Storage_>(storage_); |
| } |
| |
| ::fidl::internal::UnionMemberView<1, Storage_> response() { |
| return ::fidl::internal::UnionMemberView<1, Storage_>(storage_); |
| } |
| |
| // Sets the union to hold the response member. |
| // |
| |
| MainProtocolTwoWayAnonWithErrorResult& response(::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResponse value) { |
| storage_->emplace<1>(std::move(value)); |
| return *this; |
| } |
| static MainProtocolTwoWayAnonWithErrorResult WithErr(uint32_t val) { |
| return MainProtocolTwoWayAnonWithErrorResult(std::make_shared<Storage_>( |
| std::in_place_index_t<2>{}, |
| std::move(val))); |
| } |
| |
| const ::fidl::internal::UnionMemberView<2, Storage_> err() const { |
| return ::fidl::internal::UnionMemberView<2, Storage_>(storage_); |
| } |
| |
| ::fidl::internal::UnionMemberView<2, Storage_> err() { |
| return ::fidl::internal::UnionMemberView<2, Storage_>(storage_); |
| } |
| |
| // Sets the union to hold the err member. |
| // |
| |
| MainProtocolTwoWayAnonWithErrorResult& err(uint32_t value) { |
| storage_->emplace<2>(std::move(value)); |
| return *this; |
| } |
| |
| MainProtocolTwoWayAnonWithErrorResult(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) |
| : storage_(std::make_shared<Storage_>()) {} |
| |
| private: |
| std::shared_ptr<Storage_> storage_; |
| std::shared_ptr<Storage_> CloneStorage_() const; |
| friend struct ::fidl::internal::NaturalUnionCodingTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResult>; |
| static constexpr auto kMembers = std::make_tuple( |
| ::fidl::internal::NaturalUnionMember<::fidl::internal::NaturalCodingConstraintEmpty>(), ::fidl::internal::NaturalUnionMember<fidl::internal::NaturalCodingConstraintEmpty>(), ::fidl::internal::NaturalUnionMember<fidl::internal::NaturalCodingConstraintEmpty>()); |
| |
| explicit MainProtocolTwoWayAnonWithErrorResult(std::shared_ptr<Storage_> storage) : storage_(std::move(storage)) {} |
| |
| static constexpr size_t TagToIndex(::fidl::internal::NaturalDecoder* decoder, ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResult::Tag tag) { |
| switch (tag) { |
| case ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResult::Tag::kResponse: |
| return 1; |
| case ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResult::Tag::kErr: |
| return 2; |
| default: { |
| decoder->SetError(::fidl::internal::kCodingErrorUnknownUnionTag); |
| return 0; |
| } |
| } |
| } |
| |
| static constexpr std::optional<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResult::Tag> IndexToTag(size_t index) { |
| switch (index) { |
| case 1: |
| return ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResult::Tag::kResponse; |
| case 2: |
| return ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResult::Tag::kErr; |
| default: |
| return std::nullopt; |
| } |
| } |
| }; |
| |
| class MainProtocolOnAnonRequest { |
| private: |
| using Storage_ = |
| std::variant< |
| std::monostate, bool>; |
| |
| public: |
| // TODO: share union tag types between wire & natural. |
| enum class Tag : fidl_xunion_tag_t { |
| kB = 1, // 0x1 |
| _do_not_handle_this__write_a_default_case_instead = ::std::numeric_limits<::fidl_union_tag_t>::max(), |
| }; |
| |
| MainProtocolOnAnonRequest(MainProtocolOnAnonRequest&& other) noexcept |
| : MainProtocolOnAnonRequest(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag{}) { |
| *storage_ = std::move(*other.storage_); |
| } |
| MainProtocolOnAnonRequest& operator=(MainProtocolOnAnonRequest&& other) noexcept { |
| if (this != &other) { |
| *storage_ = std::move(*other.storage_); |
| } |
| return *this; |
| } |
| MainProtocolOnAnonRequest(const MainProtocolOnAnonRequest& other) noexcept : MainProtocolOnAnonRequest(other.CloneStorage_()) {} |
| MainProtocolOnAnonRequest& operator=(const MainProtocolOnAnonRequest& other) noexcept { |
| if (this != &other) { |
| storage_ = other.CloneStorage_(); |
| } |
| return *this; |
| } |
| |
| bool operator==(const MainProtocolOnAnonRequest& other) const noexcept { |
| return *storage_ == *other.storage_; |
| } |
| bool operator!=(const MainProtocolOnAnonRequest& other) const noexcept { |
| return *storage_ != *other.storage_; |
| } |
| constexpr bool IsUnknown() const { |
| return Which() == ::test_protocollayoutssamelibrary::MainProtocolOnAnonRequest::Tag::_do_not_handle_this__write_a_default_case_instead; |
| } |
| |
| constexpr ::test_protocollayoutssamelibrary::MainProtocolOnAnonRequest::Tag Which() const { |
| return MainProtocolOnAnonRequest::IndexToTag(storage_->index()).value(); |
| } |
| static MainProtocolOnAnonRequest WithB(bool val) { |
| return MainProtocolOnAnonRequest(std::make_shared<Storage_>( |
| std::in_place_index_t<1>{}, |
| std::move(val))); |
| } |
| |
| const ::fidl::internal::UnionMemberView<1, Storage_> b() const { |
| return ::fidl::internal::UnionMemberView<1, Storage_>(storage_); |
| } |
| |
| ::fidl::internal::UnionMemberView<1, Storage_> b() { |
| return ::fidl::internal::UnionMemberView<1, Storage_>(storage_); |
| } |
| |
| // Sets the union to hold the b member. |
| // |
| |
| MainProtocolOnAnonRequest& b(bool value) { |
| storage_->emplace<1>(std::move(value)); |
| return *this; |
| } |
| |
| MainProtocolOnAnonRequest(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) |
| : storage_(std::make_shared<Storage_>()) {} |
| |
| private: |
| std::shared_ptr<Storage_> storage_; |
| std::shared_ptr<Storage_> CloneStorage_() const; |
| friend struct ::fidl::internal::NaturalUnionCodingTraits<::test_protocollayoutssamelibrary::MainProtocolOnAnonRequest>; |
| static constexpr auto kMembers = std::make_tuple( |
| ::fidl::internal::NaturalUnionMember<::fidl::internal::NaturalCodingConstraintEmpty>(), ::fidl::internal::NaturalUnionMember<fidl::internal::NaturalCodingConstraintEmpty>()); |
| |
| explicit MainProtocolOnAnonRequest(std::shared_ptr<Storage_> storage) : storage_(std::move(storage)) {} |
| |
| static constexpr size_t TagToIndex(::fidl::internal::NaturalDecoder* decoder, ::test_protocollayoutssamelibrary::MainProtocolOnAnonRequest::Tag tag) { |
| switch (tag) { |
| case ::test_protocollayoutssamelibrary::MainProtocolOnAnonRequest::Tag::kB: |
| return 1; |
| default: { |
| return 0; |
| } |
| } |
| } |
| |
| static constexpr std::optional<::test_protocollayoutssamelibrary::MainProtocolOnAnonRequest::Tag> IndexToTag(size_t index) { |
| switch (index) { |
| case 1: |
| return ::test_protocollayoutssamelibrary::MainProtocolOnAnonRequest::Tag::kB; |
| default: |
| return ::test_protocollayoutssamelibrary::MainProtocolOnAnonRequest::Tag::_do_not_handle_this__write_a_default_case_instead; |
| } |
| } |
| }; |
| |
| inline TablePayload::TablePayload(Storage_ storage) noexcept : storage_(std::move(storage)) {} |
| inline TablePayload::TablePayload(const ::test_protocollayoutssamelibrary::TablePayload& other) noexcept : TablePayload(other.CloneStorage_()) {} |
| inline TablePayload& ::test_protocollayoutssamelibrary::TablePayload::operator=(const TablePayload & other) noexcept { |
| storage_ = other.CloneStorage_(); |
| return *this; |
| } |
| |
| inline TablePayload::TablePayload(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) : TablePayload(Storage_{}) {} |
| inline TablePayload& TablePayload::a(std::optional<uint16_t> value) { |
| storage_.a = std::move(value); |
| return *this; |
| } |
| |
| inline ComposedProtocolOneWayAnonComposedRequest::ComposedProtocolOneWayAnonComposedRequest(Storage_ storage) noexcept : storage_(std::move(storage)) {} |
| inline ComposedProtocolOneWayAnonComposedRequest::ComposedProtocolOneWayAnonComposedRequest(const ::test_protocollayoutssamelibrary::ComposedProtocolOneWayAnonComposedRequest& other) noexcept : ComposedProtocolOneWayAnonComposedRequest(other.CloneStorage_()) {} |
| inline ComposedProtocolOneWayAnonComposedRequest& ::test_protocollayoutssamelibrary::ComposedProtocolOneWayAnonComposedRequest::operator=(const ComposedProtocolOneWayAnonComposedRequest & other) noexcept { |
| storage_ = other.CloneStorage_(); |
| return *this; |
| } |
| |
| inline ComposedProtocolOneWayAnonComposedRequest::ComposedProtocolOneWayAnonComposedRequest(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) : ComposedProtocolOneWayAnonComposedRequest(Storage_{}) {} |
| inline ComposedProtocolOneWayAnonComposedRequest& ComposedProtocolOneWayAnonComposedRequest::a(std::optional<uint16_t> value) { |
| storage_.a = std::move(value); |
| return *this; |
| } |
| |
| inline ComposedProtocolTwoWayAnonComposedResponse::ComposedProtocolTwoWayAnonComposedResponse(Storage_ storage) noexcept : storage_(std::move(storage)) {} |
| inline ComposedProtocolTwoWayAnonComposedResponse::ComposedProtocolTwoWayAnonComposedResponse(const ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedResponse& other) noexcept : ComposedProtocolTwoWayAnonComposedResponse(other.CloneStorage_()) {} |
| inline ComposedProtocolTwoWayAnonComposedResponse& ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedResponse::operator=(const ComposedProtocolTwoWayAnonComposedResponse & other) noexcept { |
| storage_ = other.CloneStorage_(); |
| return *this; |
| } |
| |
| inline ComposedProtocolTwoWayAnonComposedResponse::ComposedProtocolTwoWayAnonComposedResponse(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) : ComposedProtocolTwoWayAnonComposedResponse(Storage_{}) {} |
| inline ComposedProtocolTwoWayAnonComposedResponse& ComposedProtocolTwoWayAnonComposedResponse::a(std::optional<uint16_t> value) { |
| storage_.a = std::move(value); |
| return *this; |
| } |
| |
| inline ComposedProtocolTwoWayAnonComposedWithErrorRequest::ComposedProtocolTwoWayAnonComposedWithErrorRequest(Storage_ storage) noexcept : storage_(std::move(storage)) {} |
| inline ComposedProtocolTwoWayAnonComposedWithErrorRequest::ComposedProtocolTwoWayAnonComposedWithErrorRequest(const ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorRequest& other) noexcept : ComposedProtocolTwoWayAnonComposedWithErrorRequest(other.CloneStorage_()) {} |
| inline ComposedProtocolTwoWayAnonComposedWithErrorRequest& ::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorRequest::operator=(const ComposedProtocolTwoWayAnonComposedWithErrorRequest & other) noexcept { |
| storage_ = other.CloneStorage_(); |
| return *this; |
| } |
| |
| inline ComposedProtocolTwoWayAnonComposedWithErrorRequest::ComposedProtocolTwoWayAnonComposedWithErrorRequest(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) : ComposedProtocolTwoWayAnonComposedWithErrorRequest(Storage_{}) {} |
| inline ComposedProtocolTwoWayAnonComposedWithErrorRequest& ComposedProtocolTwoWayAnonComposedWithErrorRequest::a(std::optional<uint16_t> value) { |
| storage_.a = std::move(value); |
| return *this; |
| } |
| |
| inline MainProtocolOneWayAnonRequest::MainProtocolOneWayAnonRequest(Storage_ storage) noexcept : storage_(std::move(storage)) {} |
| inline MainProtocolOneWayAnonRequest::MainProtocolOneWayAnonRequest(const ::test_protocollayoutssamelibrary::MainProtocolOneWayAnonRequest& other) noexcept : MainProtocolOneWayAnonRequest(other.CloneStorage_()) {} |
| inline MainProtocolOneWayAnonRequest& ::test_protocollayoutssamelibrary::MainProtocolOneWayAnonRequest::operator=(const MainProtocolOneWayAnonRequest & other) noexcept { |
| storage_ = other.CloneStorage_(); |
| return *this; |
| } |
| |
| inline MainProtocolOneWayAnonRequest::MainProtocolOneWayAnonRequest(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) : MainProtocolOneWayAnonRequest(Storage_{}) {} |
| inline MainProtocolOneWayAnonRequest& MainProtocolOneWayAnonRequest::a(std::optional<uint16_t> value) { |
| storage_.a = std::move(value); |
| return *this; |
| } |
| |
| inline MainProtocolTwoWayAnonResponse::MainProtocolTwoWayAnonResponse(Storage_ storage) noexcept : storage_(std::move(storage)) {} |
| inline MainProtocolTwoWayAnonResponse::MainProtocolTwoWayAnonResponse(const ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonResponse& other) noexcept : MainProtocolTwoWayAnonResponse(other.CloneStorage_()) {} |
| inline MainProtocolTwoWayAnonResponse& ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonResponse::operator=(const MainProtocolTwoWayAnonResponse & other) noexcept { |
| storage_ = other.CloneStorage_(); |
| return *this; |
| } |
| |
| inline MainProtocolTwoWayAnonResponse::MainProtocolTwoWayAnonResponse(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) : MainProtocolTwoWayAnonResponse(Storage_{}) {} |
| inline MainProtocolTwoWayAnonResponse& MainProtocolTwoWayAnonResponse::a(std::optional<uint16_t> value) { |
| storage_.a = std::move(value); |
| return *this; |
| } |
| |
| inline MainProtocolTwoWayAnonWithErrorRequest::MainProtocolTwoWayAnonWithErrorRequest(Storage_ storage) noexcept : storage_(std::move(storage)) {} |
| inline MainProtocolTwoWayAnonWithErrorRequest::MainProtocolTwoWayAnonWithErrorRequest(const ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorRequest& other) noexcept : MainProtocolTwoWayAnonWithErrorRequest(other.CloneStorage_()) {} |
| inline MainProtocolTwoWayAnonWithErrorRequest& ::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorRequest::operator=(const MainProtocolTwoWayAnonWithErrorRequest & other) noexcept { |
| storage_ = other.CloneStorage_(); |
| return *this; |
| } |
| |
| inline MainProtocolTwoWayAnonWithErrorRequest::MainProtocolTwoWayAnonWithErrorRequest(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) : MainProtocolTwoWayAnonWithErrorRequest(Storage_{}) {} |
| inline MainProtocolTwoWayAnonWithErrorRequest& MainProtocolTwoWayAnonWithErrorRequest::a(std::optional<uint16_t> value) { |
| storage_.a = std::move(value); |
| return *this; |
| } |
| |
| } // namespace test_protocollayoutssamelibrary |
| namespace fidl { |
| |
| template <> |
| struct IsFidlType<::test_protocollayoutssamelibrary::TablePayload> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_protocollayoutssamelibrary::TablePayload> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 2; |
| static constexpr uint32_t kPrimarySize = 16; |
| static constexpr uint32_t kMaxOutOfLine = 8; |
| static constexpr bool kHasPointer = true; |
| }; |
| |
| template <> |
| struct IsTable<::test_protocollayoutssamelibrary::TablePayload> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_protocollayoutssamelibrary::TablePayload, ::fidl::internal::NaturalCodingConstraintEmpty> : public ::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::TablePayload> {}; |
| |
| template <> |
| struct IsFidlType<::test_protocollayoutssamelibrary::ComposedProtocolOneWayAnonComposedRequest> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_protocollayoutssamelibrary::ComposedProtocolOneWayAnonComposedRequest> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 2; |
| static constexpr uint32_t kPrimarySize = 16; |
| static constexpr uint32_t kMaxOutOfLine = 8; |
| static constexpr bool kHasPointer = true; |
| }; |
| |
| template <> |
| struct IsTable<::test_protocollayoutssamelibrary::ComposedProtocolOneWayAnonComposedRequest> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolOneWayAnonComposedRequest, ::fidl::internal::NaturalCodingConstraintEmpty> : public ::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolOneWayAnonComposedRequest> {}; |
| |
| template <> |
| struct IsFidlType<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedResponse> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedResponse> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 2; |
| static constexpr uint32_t kPrimarySize = 16; |
| static constexpr uint32_t kMaxOutOfLine = 8; |
| static constexpr bool kHasPointer = true; |
| }; |
| |
| template <> |
| struct IsTable<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedResponse> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedResponse, ::fidl::internal::NaturalCodingConstraintEmpty> : public ::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedResponse> {}; |
| |
| template <> |
| struct IsFidlType<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorRequest> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorRequest> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 2; |
| static constexpr uint32_t kPrimarySize = 16; |
| static constexpr uint32_t kMaxOutOfLine = 8; |
| static constexpr bool kHasPointer = true; |
| }; |
| |
| template <> |
| struct IsTable<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorRequest> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorRequest, ::fidl::internal::NaturalCodingConstraintEmpty> : public ::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorRequest> {}; |
| |
| template <> |
| struct IsFidlType<::test_protocollayoutssamelibrary::MainProtocolOneWayAnonRequest> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_protocollayoutssamelibrary::MainProtocolOneWayAnonRequest> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 2; |
| static constexpr uint32_t kPrimarySize = 16; |
| static constexpr uint32_t kMaxOutOfLine = 8; |
| static constexpr bool kHasPointer = true; |
| }; |
| |
| template <> |
| struct IsTable<::test_protocollayoutssamelibrary::MainProtocolOneWayAnonRequest> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_protocollayoutssamelibrary::MainProtocolOneWayAnonRequest, ::fidl::internal::NaturalCodingConstraintEmpty> : public ::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::MainProtocolOneWayAnonRequest> {}; |
| |
| template <> |
| struct IsFidlType<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonResponse> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonResponse> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 2; |
| static constexpr uint32_t kPrimarySize = 16; |
| static constexpr uint32_t kMaxOutOfLine = 8; |
| static constexpr bool kHasPointer = true; |
| }; |
| |
| template <> |
| struct IsTable<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonResponse> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonResponse, ::fidl::internal::NaturalCodingConstraintEmpty> : public ::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonResponse> {}; |
| |
| template <> |
| struct IsFidlType<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorRequest> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorRequest> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 2; |
| static constexpr uint32_t kPrimarySize = 16; |
| static constexpr uint32_t kMaxOutOfLine = 8; |
| static constexpr bool kHasPointer = true; |
| }; |
| |
| template <> |
| struct IsTable<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorRequest> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorRequest, ::fidl::internal::NaturalCodingConstraintEmpty> : public ::fidl::internal::NaturalTableCodingTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorRequest> {}; |
| |
| template <> |
| struct IsFidlType<::test_protocollayoutssamelibrary::UnionPayload> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_protocollayoutssamelibrary::UnionPayload> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 1; |
| static constexpr uint32_t kPrimarySize = 16; |
| static constexpr uint32_t kMaxOutOfLine = 0; |
| static constexpr bool kHasPointer = true; |
| }; |
| |
| template <> |
| struct IsUnion<::test_protocollayoutssamelibrary::UnionPayload> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_protocollayoutssamelibrary::UnionPayload, ::fidl::internal::NaturalCodingConstraintEmpty> final |
| : public ::fidl::internal::NaturalUnionCodingTraits<::test_protocollayoutssamelibrary::UnionPayload> {}; |
| |
| template <> |
| struct IsFidlType<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedRequest> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedRequest> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 1; |
| static constexpr uint32_t kPrimarySize = 16; |
| static constexpr uint32_t kMaxOutOfLine = 0; |
| static constexpr bool kHasPointer = true; |
| }; |
| |
| template <> |
| struct IsUnion<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedRequest> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedRequest, ::fidl::internal::NaturalCodingConstraintEmpty> final |
| : public ::fidl::internal::NaturalUnionCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedRequest> {}; |
| |
| template <> |
| struct IsFidlType<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResponse> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResponse> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 1; |
| static constexpr uint32_t kPrimarySize = 16; |
| static constexpr uint32_t kMaxOutOfLine = 0; |
| static constexpr bool kHasPointer = true; |
| }; |
| |
| template <> |
| struct IsUnion<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResponse> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResponse, ::fidl::internal::NaturalCodingConstraintEmpty> final |
| : public ::fidl::internal::NaturalUnionCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResponse> {}; |
| |
| template <> |
| struct IsFidlType<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResult> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResult> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 2; |
| static constexpr uint32_t kPrimarySize = 16; |
| static constexpr uint32_t kMaxOutOfLine = 16; |
| static constexpr bool kHasPointer = true; |
| }; |
| |
| template <> |
| struct IsUnion<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResult> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResult, ::fidl::internal::NaturalCodingConstraintEmpty> final |
| : public ::fidl::internal::NaturalUnionCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayAnonComposedWithErrorResult> {}; |
| |
| template <> |
| struct IsFidlType<::test_protocollayoutssamelibrary::ComposedProtocolOnAnonComposedRequest> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_protocollayoutssamelibrary::ComposedProtocolOnAnonComposedRequest> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 1; |
| static constexpr uint32_t kPrimarySize = 16; |
| static constexpr uint32_t kMaxOutOfLine = 0; |
| static constexpr bool kHasPointer = true; |
| }; |
| |
| template <> |
| struct IsUnion<::test_protocollayoutssamelibrary::ComposedProtocolOnAnonComposedRequest> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolOnAnonComposedRequest, ::fidl::internal::NaturalCodingConstraintEmpty> final |
| : public ::fidl::internal::NaturalUnionCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolOnAnonComposedRequest> {}; |
| |
| template <> |
| struct IsFidlType<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayNamedComposedWithErrorResult> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayNamedComposedWithErrorResult> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 2; |
| static constexpr uint32_t kPrimarySize = 16; |
| static constexpr uint32_t kMaxOutOfLine = 16; |
| static constexpr bool kHasPointer = true; |
| }; |
| |
| template <> |
| struct IsUnion<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayNamedComposedWithErrorResult> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayNamedComposedWithErrorResult, ::fidl::internal::NaturalCodingConstraintEmpty> final |
| : public ::fidl::internal::NaturalUnionCodingTraits<::test_protocollayoutssamelibrary::ComposedProtocolTwoWayNamedComposedWithErrorResult> {}; |
| |
| template <> |
| struct IsFidlType<::test_protocollayoutssamelibrary::MainProtocolTwoWayLocalWithErrorResult> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayLocalWithErrorResult> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 2; |
| static constexpr uint32_t kPrimarySize = 16; |
| static constexpr uint32_t kMaxOutOfLine = 16; |
| static constexpr bool kHasPointer = true; |
| }; |
| |
| template <> |
| struct IsUnion<::test_protocollayoutssamelibrary::MainProtocolTwoWayLocalWithErrorResult> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayLocalWithErrorResult, ::fidl::internal::NaturalCodingConstraintEmpty> final |
| : public ::fidl::internal::NaturalUnionCodingTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayLocalWithErrorResult> {}; |
| |
| template <> |
| struct IsFidlType<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonRequest> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonRequest> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 1; |
| static constexpr uint32_t kPrimarySize = 16; |
| static constexpr uint32_t kMaxOutOfLine = 0; |
| static constexpr bool kHasPointer = true; |
| }; |
| |
| template <> |
| struct IsUnion<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonRequest> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonRequest, ::fidl::internal::NaturalCodingConstraintEmpty> final |
| : public ::fidl::internal::NaturalUnionCodingTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonRequest> {}; |
| |
| template <> |
| struct IsFidlType<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResponse> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResponse> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 1; |
| static constexpr uint32_t kPrimarySize = 16; |
| static constexpr uint32_t kMaxOutOfLine = 0; |
| static constexpr bool kHasPointer = true; |
| }; |
| |
| template <> |
| struct IsUnion<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResponse> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResponse, ::fidl::internal::NaturalCodingConstraintEmpty> final |
| : public ::fidl::internal::NaturalUnionCodingTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResponse> {}; |
| |
| template <> |
| struct IsFidlType<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResult> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResult> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 2; |
| static constexpr uint32_t kPrimarySize = 16; |
| static constexpr uint32_t kMaxOutOfLine = 16; |
| static constexpr bool kHasPointer = true; |
| }; |
| |
| template <> |
| struct IsUnion<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResult> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResult, ::fidl::internal::NaturalCodingConstraintEmpty> final |
| : public ::fidl::internal::NaturalUnionCodingTraits<::test_protocollayoutssamelibrary::MainProtocolTwoWayAnonWithErrorResult> {}; |
| |
| template <> |
| struct IsFidlType<::test_protocollayoutssamelibrary::MainProtocolOnAnonRequest> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_protocollayoutssamelibrary::MainProtocolOnAnonRequest> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 1; |
| static constexpr uint32_t kPrimarySize = 16; |
| static constexpr uint32_t kMaxOutOfLine = 0; |
| static constexpr bool kHasPointer = true; |
| }; |
| |
| template <> |
| struct IsUnion<::test_protocollayoutssamelibrary::MainProtocolOnAnonRequest> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_protocollayoutssamelibrary::MainProtocolOnAnonRequest, ::fidl::internal::NaturalCodingConstraintEmpty> final |
| : public ::fidl::internal::NaturalUnionCodingTraits<::test_protocollayoutssamelibrary::MainProtocolOnAnonRequest> {}; |
| |
| #pragma clang diagnostic pop |
| |
| } // namespace fidl |