| // WARNING: This file is machine generated by fidlgen. |
| |
| // fidl_experiment = output_index_json |
| |
| #pragma once |
| |
| #include <fidl/test.transitivedependencies/cpp/common_types.h> |
| #include <fidl/test.transitivedependencies/cpp/markers.h> |
| #include <lib/fidl/cpp/natural_coding_traits.h> |
| #include <lib/fidl/cpp/natural_types.h> |
| |
| #include <cinttypes> |
| #include <string> |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #include <fidl/test.middle/cpp/natural_types.h> |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wshadow" |
| |
| namespace test_transitivedependencies { |
| |
| class Baz; |
| |
| class Baz { |
| private: |
| struct Storage_; |
| |
| public: |
| Baz(Storage_ storage) noexcept; |
| Baz(::test_middle::Bar g) noexcept; |
| |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wdefaulted-function-deleted" |
| // Default constructs a |Baz| only if all of its members are default constructible. |
| Baz() = default; |
| #pragma clang diagnostic pop |
| |
| Baz(Baz&&) noexcept = default; |
| Baz& operator=(Baz&&) noexcept = default; |
| Baz(const Baz& other) noexcept; |
| Baz& operator=(const Baz& other) noexcept; |
| |
| bool operator==(const Baz& other) const noexcept { |
| return ::fidl::internal::NaturalStructCodingTraits<::test_transitivedependencies::Baz, 4>::Equal(this, &other); |
| } |
| bool operator!=(const Baz& other) const noexcept { |
| return !::fidl::internal::NaturalStructCodingTraits<::test_transitivedependencies::Baz, 4>::Equal(this, &other); |
| } |
| |
| const ::test_middle::Bar& |
| g() const { |
| return storage_.g; |
| } |
| |
| ::test_middle::Bar& g() { |
| return storage_.g; |
| } |
| |
| // Setter for g. |
| // |
| |
| Baz& g(::test_middle::Bar value); |
| |
| Baz(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag); |
| |
| private: |
| struct Storage_ final { |
| ::test_middle::Bar g; |
| }; |
| |
| Storage_ storage_; |
| Storage_ CloneStorage_() const; |
| |
| friend struct ::fidl::internal::NaturalStructCodingTraits<::test_transitivedependencies::Baz, 4>; |
| friend struct ::fidl::internal::MemberVisitor<::test_transitivedependencies::Baz>; |
| static constexpr auto kMembers = std::make_tuple(::fidl::internal::NaturalStructMember<Storage_, ::test_middle::Bar, fidl::internal::NaturalCodingConstraintEmpty>{ |
| &Storage_::g, 0}); |
| static constexpr auto kPadding = std::make_tuple(); |
| }; |
| |
| inline Baz::Baz(Storage_ storage) noexcept : storage_(std::move(storage)) {} |
| inline Baz::Baz(::test_middle::Bar g) noexcept |
| : storage_({.g = std::move(g)}) {} |
| inline Baz::Baz(const ::test_transitivedependencies::Baz& other) noexcept : ::test_transitivedependencies::Baz(other.CloneStorage_()) {} |
| inline Baz& ::test_transitivedependencies::Baz::operator=(const ::test_transitivedependencies::Baz & other) noexcept { |
| storage_ = other.CloneStorage_(); |
| return *this; |
| } |
| |
| inline Baz::Baz(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) : Baz(Storage_{ |
| .g = ::fidl::internal::DefaultConstructPossiblyInvalidObjectTag{}, |
| }) {} |
| inline Baz& Baz::g(::test_middle::Bar value) { |
| storage_.g = std::move(value); |
| return *this; |
| } |
| |
| } // namespace test_transitivedependencies |
| namespace fidl { |
| |
| template <> |
| struct IsFidlType<::test_transitivedependencies::Baz> : public std::true_type {}; |
| |
| template <> |
| struct TypeTraits<::test_transitivedependencies::Baz> { |
| 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_transitivedependencies::Baz> : public std::true_type {}; |
| |
| template <> |
| struct internal::NaturalCodingTraits<::test_transitivedependencies::Baz, ::fidl::internal::NaturalCodingConstraintEmpty> final |
| : public ::fidl::internal::NaturalStructCodingTraits<::test_transitivedependencies::Baz, 4> {}; |
| |
| #pragma clang diagnostic pop |
| |
| } // namespace fidl |