| // WARNING: This file is machine generated by fidlgen. |
| |
| // fidl_experiment = output_index_json |
| |
| #pragma once |
| |
| #include <fidl/test.encapsulatedstructs/cpp/common_types.h> |
| #include <fidl/test.encapsulatedstructs/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/handle.h> |
| |
| #endif // __Fuchsia__ |
| |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wshadow" |
| |
| namespace test_encapsulatedstructs { |
| |
| class Int8Int32; |
| |
| class Int16Int8; |
| |
| class ArrayInt16Int8; |
| |
| class StructPaddingTestStruct; |
| |
| class NonInlineStructTestStruct; |
| |
| class TopLevelStruct; |
| |
| class Int8Int32 { |
| private: |
| struct Storage_; |
| |
| public: |
| Int8Int32(Storage_ storage) noexcept; |
| Int8Int32(int8_t a, int32_t b) noexcept; |
| |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wdefaulted-function-deleted" |
| // Default constructs a |Int8Int32| only if all of its members are default constructible. |
| Int8Int32() = default; |
| #pragma clang diagnostic pop |
| |
| Int8Int32(Int8Int32&&) noexcept = default; |
| Int8Int32& operator=(Int8Int32&&) noexcept = default; |
| Int8Int32(const Int8Int32& other) noexcept; |
| Int8Int32& operator=(const Int8Int32& other) noexcept; |
| |
| bool operator==(const Int8Int32& other) const noexcept { |
| return ::fidl::internal::NaturalStructCodingTraits<::test_encapsulatedstructs::Int8Int32, 8>::Equal(this, &other); |
| } |
| bool operator!=(const Int8Int32& other) const noexcept { |
| return !::fidl::internal::NaturalStructCodingTraits<::test_encapsulatedstructs::Int8Int32, 8>::Equal(this, &other); |
| } |
| |
| int8_t |
| a() const { |
| return storage_.a; |
| } |
| |
| int8_t& a() { |
| return storage_.a; |
| } |
| |
| // Setter for a. |
| // |
| |
| Int8Int32& a(int8_t value); |
| |
| int32_t |
| b() const { |
| return storage_.b; |
| } |
| |
| int32_t& b() { |
| return storage_.b; |
| } |
| |
| // Setter for b. |
| // |
| |
| Int8Int32& b(int32_t value); |
| |
| Int8Int32(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag); |
| |
| private: |
| struct Storage_ final { |
| int8_t a = {}; |
| int32_t b = {}; |
| }; |
| |
| Storage_ storage_; |
| Storage_ CloneStorage_() const; |
| |
| friend struct ::fidl::internal::NaturalStructCodingTraits<::test_encapsulatedstructs::Int8Int32, 8>; |
| friend struct ::fidl::internal::MemberVisitor<::test_encapsulatedstructs::Int8Int32>; |
| static constexpr auto kMembers = std::make_tuple(::fidl::internal::NaturalStructMember<Storage_, int8_t, fidl::internal::NaturalCodingConstraintEmpty>{ |
| &Storage_::a, 0}, |
| ::fidl::internal::NaturalStructMember<Storage_, int32_t, fidl::internal::NaturalCodingConstraintEmpty>{&Storage_::b, 4}); |
| static constexpr auto kPadding = std::make_tuple(::fidl::internal::NaturalStructPadding<uint32_t>{ |
| .offset = 0, |
| .mask = 0xffffff00, |
| }); |
| }; |
| |
| class Int16Int8 { |
| private: |
| struct Storage_; |
| |
| public: |
| Int16Int8(Storage_ storage) noexcept; |
| Int16Int8(int16_t a, int8_t b) noexcept; |
| |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wdefaulted-function-deleted" |
| // Default constructs a |Int16Int8| only if all of its members are default constructible. |
| Int16Int8() = default; |
| #pragma clang diagnostic pop |
| |
| Int16Int8(Int16Int8&&) noexcept = default; |
| Int16Int8& operator=(Int16Int8&&) noexcept = default; |
| Int16Int8(const Int16Int8& other) noexcept; |
| Int16Int8& operator=(const Int16Int8& other) noexcept; |
| |
| bool operator==(const Int16Int8& other) const noexcept { |
| return ::fidl::internal::NaturalStructCodingTraits<::test_encapsulatedstructs::Int16Int8, 4>::Equal(this, &other); |
| } |
| bool operator!=(const Int16Int8& other) const noexcept { |
| return !::fidl::internal::NaturalStructCodingTraits<::test_encapsulatedstructs::Int16Int8, 4>::Equal(this, &other); |
| } |
| |
| int16_t |
| a() const { |
| return storage_.a; |
| } |
| |
| int16_t& a() { |
| return storage_.a; |
| } |
| |
| // Setter for a. |
| // |
| |
| Int16Int8& a(int16_t value); |
| |
| int8_t |
| b() const { |
| return storage_.b; |
| } |
| |
| int8_t& b() { |
| return storage_.b; |
| } |
| |
| // Setter for b. |
| // |
| |
| Int16Int8& b(int8_t value); |
| |
| Int16Int8(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag); |
| |
| private: |
| struct Storage_ final { |
| int16_t a = {}; |
| int8_t b = {}; |
| }; |
| |
| Storage_ storage_; |
| Storage_ CloneStorage_() const; |
| |
| friend struct ::fidl::internal::NaturalStructCodingTraits<::test_encapsulatedstructs::Int16Int8, 4>; |
| friend struct ::fidl::internal::MemberVisitor<::test_encapsulatedstructs::Int16Int8>; |
| static constexpr auto kMembers = std::make_tuple(::fidl::internal::NaturalStructMember<Storage_, int16_t, fidl::internal::NaturalCodingConstraintEmpty>{ |
| &Storage_::a, 0}, |
| ::fidl::internal::NaturalStructMember<Storage_, int8_t, fidl::internal::NaturalCodingConstraintEmpty>{&Storage_::b, 2}); |
| static constexpr auto kPadding = std::make_tuple(::fidl::internal::NaturalStructPadding<uint16_t>{ |
| .offset = 2, |
| .mask = 0xff00, |
| }); |
| }; |
| |
| class ArrayInt16Int8 { |
| private: |
| struct Storage_; |
| |
| public: |
| ArrayInt16Int8(Storage_ storage) noexcept; |
| ArrayInt16Int8(::std::array<::test_encapsulatedstructs::Int16Int8, 3> arr) noexcept; |
| |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wdefaulted-function-deleted" |
| // Default constructs a |ArrayInt16Int8| only if all of its members are default constructible. |
| ArrayInt16Int8() = default; |
| #pragma clang diagnostic pop |
| |
| ArrayInt16Int8(ArrayInt16Int8&&) noexcept = default; |
| ArrayInt16Int8& operator=(ArrayInt16Int8&&) noexcept = default; |
| ArrayInt16Int8(const ArrayInt16Int8& other) noexcept; |
| ArrayInt16Int8& operator=(const ArrayInt16Int8& other) noexcept; |
| |
| bool operator==(const ArrayInt16Int8& other) const noexcept { |
| return ::fidl::internal::NaturalStructCodingTraits<::test_encapsulatedstructs::ArrayInt16Int8, 12>::Equal(this, &other); |
| } |
| bool operator!=(const ArrayInt16Int8& other) const noexcept { |
| return !::fidl::internal::NaturalStructCodingTraits<::test_encapsulatedstructs::ArrayInt16Int8, 12>::Equal(this, &other); |
| } |
| |
| const ::std::array<::test_encapsulatedstructs::Int16Int8, 3>& |
| arr() const { |
| return storage_.arr; |
| } |
| |
| ::std::array<::test_encapsulatedstructs::Int16Int8, 3>& arr() { |
| return storage_.arr; |
| } |
| |
| // Setter for arr. |
| // |
| |
| ArrayInt16Int8& arr(::std::array<::test_encapsulatedstructs::Int16Int8, 3> value); |
| |
| ArrayInt16Int8(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag); |
| |
| private: |
| struct Storage_ final { |
| ::std::array<::test_encapsulatedstructs::Int16Int8, 3> arr; |
| }; |
| |
| Storage_ storage_; |
| Storage_ CloneStorage_() const; |
| |
| friend struct ::fidl::internal::NaturalStructCodingTraits<::test_encapsulatedstructs::ArrayInt16Int8, 12>; |
| friend struct ::fidl::internal::MemberVisitor<::test_encapsulatedstructs::ArrayInt16Int8>; |
| static constexpr auto kMembers = std::make_tuple(::fidl::internal::NaturalStructMember<Storage_, ::std::array<::test_encapsulatedstructs::Int16Int8, 3>, fidl::internal::NaturalCodingConstraintEmpty>{ |
| &Storage_::arr, 0}); |
| static constexpr auto kPadding = std::make_tuple(); |
| }; |
| |
| class StructPaddingTestStruct { |
| private: |
| struct Storage_; |
| |
| public: |
| StructPaddingTestStruct(Storage_ storage) noexcept; |
| StructPaddingTestStruct(::test_encapsulatedstructs::Int16Int8 trailing, ::test_encapsulatedstructs::Int8Int32 inner, ::test_encapsulatedstructs::ArrayInt16Int8 array) noexcept; |
| |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wdefaulted-function-deleted" |
| // Default constructs a |StructPaddingTestStruct| only if all of its members are default constructible. |
| StructPaddingTestStruct() = default; |
| #pragma clang diagnostic pop |
| |
| StructPaddingTestStruct(StructPaddingTestStruct&&) noexcept = default; |
| StructPaddingTestStruct& operator=(StructPaddingTestStruct&&) noexcept = default; |
| StructPaddingTestStruct(const StructPaddingTestStruct& other) noexcept; |
| StructPaddingTestStruct& operator=(const StructPaddingTestStruct& other) noexcept; |
| |
| bool operator==(const StructPaddingTestStruct& other) const noexcept { |
| return ::fidl::internal::NaturalStructCodingTraits<::test_encapsulatedstructs::StructPaddingTestStruct, 24>::Equal(this, &other); |
| } |
| bool operator!=(const StructPaddingTestStruct& other) const noexcept { |
| return !::fidl::internal::NaturalStructCodingTraits<::test_encapsulatedstructs::StructPaddingTestStruct, 24>::Equal(this, &other); |
| } |
| |
| const ::test_encapsulatedstructs::Int16Int8& |
| trailing() const { |
| return storage_.trailing; |
| } |
| |
| ::test_encapsulatedstructs::Int16Int8& trailing() { |
| return storage_.trailing; |
| } |
| |
| // Setter for trailing. |
| // |
| |
| StructPaddingTestStruct& trailing(::test_encapsulatedstructs::Int16Int8 value); |
| |
| const ::test_encapsulatedstructs::Int8Int32& |
| inner() const { |
| return storage_.inner; |
| } |
| |
| ::test_encapsulatedstructs::Int8Int32& inner() { |
| return storage_.inner; |
| } |
| |
| // Setter for inner. |
| // |
| |
| StructPaddingTestStruct& inner(::test_encapsulatedstructs::Int8Int32 value); |
| |
| const ::test_encapsulatedstructs::ArrayInt16Int8& |
| array() const { |
| return storage_.array; |
| } |
| |
| ::test_encapsulatedstructs::ArrayInt16Int8& array() { |
| return storage_.array; |
| } |
| |
| // Setter for array. |
| // |
| |
| StructPaddingTestStruct& array(::test_encapsulatedstructs::ArrayInt16Int8 value); |
| |
| StructPaddingTestStruct(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag); |
| |
| private: |
| struct Storage_ final { |
| ::test_encapsulatedstructs::Int16Int8 trailing; |
| ::test_encapsulatedstructs::Int8Int32 inner; |
| ::test_encapsulatedstructs::ArrayInt16Int8 array; |
| }; |
| |
| Storage_ storage_; |
| Storage_ CloneStorage_() const; |
| |
| friend struct ::fidl::internal::NaturalStructCodingTraits<::test_encapsulatedstructs::StructPaddingTestStruct, 24>; |
| friend struct ::fidl::internal::MemberVisitor<::test_encapsulatedstructs::StructPaddingTestStruct>; |
| static constexpr auto kMembers = std::make_tuple(::fidl::internal::NaturalStructMember<Storage_, ::test_encapsulatedstructs::Int16Int8, fidl::internal::NaturalCodingConstraintEmpty>{ |
| &Storage_::trailing, 0}, |
| ::fidl::internal::NaturalStructMember<Storage_, ::test_encapsulatedstructs::Int8Int32, fidl::internal::NaturalCodingConstraintEmpty>{&Storage_::inner, 4}, ::fidl::internal::NaturalStructMember<Storage_, ::test_encapsulatedstructs::ArrayInt16Int8, fidl::internal::NaturalCodingConstraintEmpty>{&Storage_::array, 12}); |
| static constexpr auto kPadding = std::make_tuple(); |
| }; |
| |
| #ifdef __Fuchsia__ |
| |
| class NonInlineStructTestStruct { |
| private: |
| struct Storage_; |
| |
| public: |
| NonInlineStructTestStruct(Storage_ storage) noexcept; |
| NonInlineStructTestStruct(::fidl::Box<::test_encapsulatedstructs::Int16Int8> element, ::zx::handle h) noexcept; |
| |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wdefaulted-function-deleted" |
| // Default constructs a |NonInlineStructTestStruct| only if all of its members are default constructible. |
| NonInlineStructTestStruct() = default; |
| #pragma clang diagnostic pop |
| |
| NonInlineStructTestStruct(NonInlineStructTestStruct&&) noexcept = default; |
| NonInlineStructTestStruct& operator=(NonInlineStructTestStruct&&) noexcept = default; |
| |
| const ::fidl::Box<::test_encapsulatedstructs::Int16Int8>& |
| element() const { |
| return storage_.element; |
| } |
| |
| ::fidl::Box<::test_encapsulatedstructs::Int16Int8>& element() { |
| return storage_.element; |
| } |
| |
| // Setter for element. |
| // |
| |
| NonInlineStructTestStruct& element(::fidl::Box<::test_encapsulatedstructs::Int16Int8> value); |
| |
| const ::zx::handle& |
| h() const { |
| return storage_.h; |
| } |
| |
| ::zx::handle& h() { |
| return storage_.h; |
| } |
| |
| // Setter for h. |
| // |
| |
| NonInlineStructTestStruct& h(::zx::handle value); |
| |
| NonInlineStructTestStruct(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag); |
| |
| private: |
| struct Storage_ final { |
| ::fidl::Box<::test_encapsulatedstructs::Int16Int8> element; |
| ::zx::handle h; |
| }; |
| |
| Storage_ storage_; |
| |
| friend struct ::fidl::internal::NaturalStructCodingTraits<::test_encapsulatedstructs::NonInlineStructTestStruct, 16>; |
| friend struct ::fidl::internal::MemberVisitor<::test_encapsulatedstructs::NonInlineStructTestStruct>; |
| static constexpr auto kMembers = std::make_tuple(::fidl::internal::NaturalStructMember<Storage_, ::fidl::Box<::test_encapsulatedstructs::Int16Int8>, fidl::internal::NaturalCodingConstraintEmpty>{ |
| &Storage_::element, 0}, |
| ::fidl::internal::NaturalStructMember<Storage_, ::zx::handle, fidl::internal::NaturalCodingConstraintHandle<ZX_OBJ_TYPE_NONE, 0x80000000, false>>{&Storage_::h, 8}); |
| static constexpr auto kPadding = std::make_tuple(::fidl::internal::NaturalStructPadding<uint64_t>{ |
| .offset = 8, |
| .mask = 0xffffffff00000000, |
| }); |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| class TopLevelStruct { |
| private: |
| struct Storage_; |
| |
| public: |
| TopLevelStruct(Storage_ storage) noexcept; |
| TopLevelStruct(::test_encapsulatedstructs::StructPaddingTestStruct a, ::test_encapsulatedstructs::NonInlineStructTestStruct b) noexcept; |
| |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wdefaulted-function-deleted" |
| // Default constructs a |TopLevelStruct| only if all of its members are default constructible. |
| TopLevelStruct() = default; |
| #pragma clang diagnostic pop |
| |
| TopLevelStruct(TopLevelStruct&&) noexcept = default; |
| TopLevelStruct& operator=(TopLevelStruct&&) noexcept = default; |
| |
| const ::test_encapsulatedstructs::StructPaddingTestStruct& |
| a() const { |
| return storage_.a; |
| } |
| |
| ::test_encapsulatedstructs::StructPaddingTestStruct& a() { |
| return storage_.a; |
| } |
| |
| // Setter for a. |
| // |
| |
| TopLevelStruct& a(::test_encapsulatedstructs::StructPaddingTestStruct value); |
| |
| const ::test_encapsulatedstructs::NonInlineStructTestStruct& |
| b() const { |
| return storage_.b; |
| } |
| |
| ::test_encapsulatedstructs::NonInlineStructTestStruct& b() { |
| return storage_.b; |
| } |
| |
| // Setter for b. |
| // |
| |
| TopLevelStruct& b(::test_encapsulatedstructs::NonInlineStructTestStruct value); |
| |
| TopLevelStruct(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag); |
| |
| private: |
| struct Storage_ final { |
| ::test_encapsulatedstructs::StructPaddingTestStruct a; |
| ::test_encapsulatedstructs::NonInlineStructTestStruct b; |
| }; |
| |
| Storage_ storage_; |
| |
| friend struct ::fidl::internal::NaturalStructCodingTraits<::test_encapsulatedstructs::TopLevelStruct, 40>; |
| friend struct ::fidl::internal::MemberVisitor<::test_encapsulatedstructs::TopLevelStruct>; |
| static constexpr auto kMembers = std::make_tuple(::fidl::internal::NaturalStructMember<Storage_, ::test_encapsulatedstructs::StructPaddingTestStruct, fidl::internal::NaturalCodingConstraintEmpty>{ |
| &Storage_::a, 0}, |
| ::fidl::internal::NaturalStructMember<Storage_, ::test_encapsulatedstructs::NonInlineStructTestStruct, fidl::internal::NaturalCodingConstraintEmpty>{&Storage_::b, 24}); |
| static constexpr auto kPadding = std::make_tuple(); |
| }; |
| |
| #endif // __Fuchsia__ |
| |
| inline Int8Int32::Int8Int32(Storage_ storage) noexcept : storage_(std::move(storage)) {} |
| inline Int8Int32::Int8Int32(int8_t a, int32_t b) noexcept |
| : storage_({.a = std::move(a), |
| .b = std::move(b)}) {} |
| inline Int8Int32::Int8Int32(const ::test_encapsulatedstructs::Int8Int32& other) noexcept : ::test_encapsulatedstructs::Int8Int32(other.CloneStorage_()) {} |
| inline Int8Int32& ::test_encapsulatedstructs::Int8Int32::operator=(const ::test_encapsulatedstructs::Int8Int32 & other) noexcept { |
| storage_ = other.CloneStorage_(); |
| return *this; |
| } |
| |
| inline Int8Int32::Int8Int32(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) : Int8Int32(Storage_{ |
| .a = {}, |
| .b = {}, |
| }) {} |
| inline Int8Int32& Int8Int32::a(int8_t value) { |
| storage_.a = std::move(value); |
| return *this; |
| } |
| inline Int8Int32& Int8Int32::b(int32_t value) { |
| storage_.b = std::move(value); |
| return *this; |
| } |
| |
| inline Int16Int8::Int16Int8(Storage_ storage) noexcept : storage_(std::move(storage)) {} |
| inline Int16Int8::Int16Int8(int16_t a, int8_t b) noexcept |
| : storage_({.a = std::move(a), |
| .b = std::move(b)}) {} |
| inline Int16Int8::Int16Int8(const ::test_encapsulatedstructs::Int16Int8& other) noexcept : ::test_encapsulatedstructs::Int16Int8(other.CloneStorage_()) {} |
| inline Int16Int8& ::test_encapsulatedstructs::Int16Int8::operator=(const ::test_encapsulatedstructs::Int16Int8 & other) noexcept { |
| storage_ = other.CloneStorage_(); |
| return *this; |
| } |
| |
| inline Int16Int8::Int16Int8(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) : Int16Int8(Storage_{ |
| .a = {}, |
| .b = {}, |
| }) {} |
| inline Int16Int8& Int16Int8::a(int16_t value) { |
| storage_.a = std::move(value); |
| return *this; |
| } |
| inline Int16Int8& Int16Int8::b(int8_t value) { |
| storage_.b = std::move(value); |
| return *this; |
| } |
| |
| inline ArrayInt16Int8::ArrayInt16Int8(Storage_ storage) noexcept : storage_(std::move(storage)) {} |
| inline ArrayInt16Int8::ArrayInt16Int8(::std::array<::test_encapsulatedstructs::Int16Int8, 3> arr) noexcept |
| : storage_({.arr = std::move(arr)}) {} |
| inline ArrayInt16Int8::ArrayInt16Int8(const ::test_encapsulatedstructs::ArrayInt16Int8& other) noexcept : ::test_encapsulatedstructs::ArrayInt16Int8(other.CloneStorage_()) {} |
| inline ArrayInt16Int8& ::test_encapsulatedstructs::ArrayInt16Int8::operator=(const ::test_encapsulatedstructs::ArrayInt16Int8 & other) noexcept { |
| storage_ = other.CloneStorage_(); |
| return *this; |
| } |
| |
| inline ArrayInt16Int8::ArrayInt16Int8(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) : ArrayInt16Int8(Storage_{ |
| .arr = ::fidl::internal::DefaultConstructPossiblyInvalidObject<::std::array<::test_encapsulatedstructs::Int16Int8, 3>>::Make(), |
| }) {} |
| inline ArrayInt16Int8& ArrayInt16Int8::arr(::std::array<::test_encapsulatedstructs::Int16Int8, 3> value) { |
| storage_.arr = std::move(value); |
| return *this; |
| } |
| |
| inline StructPaddingTestStruct::StructPaddingTestStruct(Storage_ storage) noexcept : storage_(std::move(storage)) {} |
| inline StructPaddingTestStruct::StructPaddingTestStruct(::test_encapsulatedstructs::Int16Int8 trailing, ::test_encapsulatedstructs::Int8Int32 inner, ::test_encapsulatedstructs::ArrayInt16Int8 array) noexcept |
| : storage_({.trailing = std::move(trailing), |
| .inner = std::move(inner), |
| .array = std::move(array)}) {} |
| inline StructPaddingTestStruct::StructPaddingTestStruct(const ::test_encapsulatedstructs::StructPaddingTestStruct& other) noexcept : ::test_encapsulatedstructs::StructPaddingTestStruct(other.CloneStorage_()) {} |
| inline StructPaddingTestStruct& ::test_encapsulatedstructs::StructPaddingTestStruct::operator=(const ::test_encapsulatedstructs::StructPaddingTestStruct & other) noexcept { |
| storage_ = other.CloneStorage_(); |
| return *this; |
| } |
| |
| inline StructPaddingTestStruct::StructPaddingTestStruct(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) : StructPaddingTestStruct(Storage_{ |
| .trailing = ::fidl::internal::DefaultConstructPossiblyInvalidObjectTag{}, |
| .inner = ::fidl::internal::DefaultConstructPossiblyInvalidObjectTag{}, |
| .array = ::fidl::internal::DefaultConstructPossiblyInvalidObjectTag{}, |
| }) {} |
| inline StructPaddingTestStruct& StructPaddingTestStruct::trailing(::test_encapsulatedstructs::Int16Int8 value) { |
| storage_.trailing = std::move(value); |
| return *this; |
| } |
| inline StructPaddingTestStruct& StructPaddingTestStruct::inner(::test_encapsulatedstructs::Int8Int32 value) { |
| storage_.inner = std::move(value); |
| return *this; |
| } |
| inline StructPaddingTestStruct& StructPaddingTestStruct::array(::test_encapsulatedstructs::ArrayInt16Int8 value) { |
| storage_.array = std::move(value); |
| return *this; |
| } |
| |
| #ifdef __Fuchsia__ |
| |
| inline NonInlineStructTestStruct::NonInlineStructTestStruct(Storage_ storage) noexcept : storage_(std::move(storage)) {} |
| inline NonInlineStructTestStruct::NonInlineStructTestStruct(::fidl::Box<::test_encapsulatedstructs::Int16Int8> element, ::zx::handle h) noexcept |
| : storage_({.element = std::move(element), |
| .h = std::move(h)}) {} |
| |
| inline NonInlineStructTestStruct::NonInlineStructTestStruct(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) : NonInlineStructTestStruct(Storage_{ |
| .element = {}, |
| .h = {}, |
| }) {} |
| inline NonInlineStructTestStruct& NonInlineStructTestStruct::element(::fidl::Box<::test_encapsulatedstructs::Int16Int8> value) { |
| storage_.element = std::move(value); |
| return *this; |
| } |
| inline NonInlineStructTestStruct& NonInlineStructTestStruct::h(::zx::handle value) { |
| storage_.h = std::move(value); |
| return *this; |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| inline TopLevelStruct::TopLevelStruct(Storage_ storage) noexcept : storage_(std::move(storage)) {} |
| inline TopLevelStruct::TopLevelStruct(::test_encapsulatedstructs::StructPaddingTestStruct a, ::test_encapsulatedstructs::NonInlineStructTestStruct b) noexcept |
| : storage_({.a = std::move(a), |
| .b = std::move(b)}) {} |
| |
| inline TopLevelStruct::TopLevelStruct(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) : TopLevelStruct(Storage_{ |
| .a = ::fidl::internal::DefaultConstructPossiblyInvalidObjectTag{}, |
| .b = ::fidl::internal::DefaultConstructPossiblyInvalidObjectTag{}, |
| }) {} |
| inline TopLevelStruct& TopLevelStruct::a(::test_encapsulatedstructs::StructPaddingTestStruct value) { |
| storage_.a = std::move(value); |
| return *this; |
| } |
| inline TopLevelStruct& TopLevelStruct::b(::test_encapsulatedstructs::NonInlineStructTestStruct value) { |
| storage_.b = std::move(value); |
| return *this; |
| } |
| |
| #endif // __Fuchsia__ |
| |
| } // namespace test_encapsulatedstructs |
| namespace fidl { |
| |
| template <> |
| struct IsFidlType<::test_encapsulatedstructs::Int8Int32> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_encapsulatedstructs::Int8Int32> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 0; |
| static constexpr uint32_t kPrimarySize = 8; |
| static constexpr uint32_t kMaxOutOfLine = 0; |
| static constexpr bool kHasPointer = false; |
| }; |
| |
| template <> |
| struct IsStruct<::test_encapsulatedstructs::Int8Int32> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_encapsulatedstructs::Int8Int32, ::fidl::internal::NaturalCodingConstraintEmpty> final |
| : public ::fidl::internal::NaturalStructCodingTraits<::test_encapsulatedstructs::Int8Int32, 8> {}; |
| |
| template <> |
| struct IsFidlType<::test_encapsulatedstructs::Int16Int8> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_encapsulatedstructs::Int16Int8> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 0; |
| static constexpr uint32_t kPrimarySize = 4; |
| static constexpr uint32_t kMaxOutOfLine = 0; |
| static constexpr bool kHasPointer = false; |
| }; |
| |
| template <> |
| struct IsStruct<::test_encapsulatedstructs::Int16Int8> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_encapsulatedstructs::Int16Int8, ::fidl::internal::NaturalCodingConstraintEmpty> final |
| : public ::fidl::internal::NaturalStructCodingTraits<::test_encapsulatedstructs::Int16Int8, 4> {}; |
| |
| template <> |
| struct IsFidlType<::test_encapsulatedstructs::ArrayInt16Int8> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_encapsulatedstructs::ArrayInt16Int8> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 0; |
| static constexpr uint32_t kPrimarySize = 12; |
| static constexpr uint32_t kMaxOutOfLine = 0; |
| static constexpr bool kHasPointer = false; |
| }; |
| |
| template <> |
| struct IsStruct<::test_encapsulatedstructs::ArrayInt16Int8> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_encapsulatedstructs::ArrayInt16Int8, ::fidl::internal::NaturalCodingConstraintEmpty> final |
| : public ::fidl::internal::NaturalStructCodingTraits<::test_encapsulatedstructs::ArrayInt16Int8, 12> {}; |
| |
| template <> |
| struct IsFidlType<::test_encapsulatedstructs::StructPaddingTestStruct> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_encapsulatedstructs::StructPaddingTestStruct> { |
| static constexpr uint32_t kMaxNumHandles = 0; |
| static constexpr uint32_t kMaxDepth = 0; |
| static constexpr uint32_t kPrimarySize = 24; |
| static constexpr uint32_t kMaxOutOfLine = 0; |
| static constexpr bool kHasPointer = false; |
| }; |
| |
| template <> |
| struct IsStruct<::test_encapsulatedstructs::StructPaddingTestStruct> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_encapsulatedstructs::StructPaddingTestStruct, ::fidl::internal::NaturalCodingConstraintEmpty> final |
| : public ::fidl::internal::NaturalStructCodingTraits<::test_encapsulatedstructs::StructPaddingTestStruct, 24> {}; |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| struct IsResource<::test_encapsulatedstructs::NonInlineStructTestStruct> : public std::true_type {}; |
| template <> |
| struct IsFidlType<::test_encapsulatedstructs::NonInlineStructTestStruct> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_encapsulatedstructs::NonInlineStructTestStruct> { |
| static constexpr uint32_t kMaxNumHandles = 1; |
| static constexpr uint32_t kMaxDepth = 1; |
| static constexpr uint32_t kPrimarySize = 16; |
| static constexpr uint32_t kMaxOutOfLine = 8; |
| static constexpr bool kHasPointer = true; |
| }; |
| |
| template <> |
| struct IsStruct<::test_encapsulatedstructs::NonInlineStructTestStruct> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_encapsulatedstructs::NonInlineStructTestStruct, ::fidl::internal::NaturalCodingConstraintEmpty> final |
| : public ::fidl::internal::NaturalStructCodingTraits<::test_encapsulatedstructs::NonInlineStructTestStruct, 16> {}; |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| template <> |
| struct IsResource<::test_encapsulatedstructs::TopLevelStruct> : public std::true_type {}; |
| template <> |
| struct IsFidlType<::test_encapsulatedstructs::TopLevelStruct> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_encapsulatedstructs::TopLevelStruct> { |
| static constexpr uint32_t kMaxNumHandles = 1; |
| static constexpr uint32_t kMaxDepth = 1; |
| static constexpr uint32_t kPrimarySize = 40; |
| static constexpr uint32_t kMaxOutOfLine = 8; |
| static constexpr bool kHasPointer = true; |
| }; |
| |
| template <> |
| struct IsStruct<::test_encapsulatedstructs::TopLevelStruct> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_encapsulatedstructs::TopLevelStruct, ::fidl::internal::NaturalCodingConstraintEmpty> final |
| : public ::fidl::internal::NaturalStructCodingTraits<::test_encapsulatedstructs::TopLevelStruct, 40> {}; |
| |
| #endif // __Fuchsia__ |
| |
| #pragma clang diagnostic pop |
| |
| } // namespace fidl |