| // WARNING: This file is machine generated by fidlgen. |
| |
| #pragma once |
| |
| #include <lib/fidl/internal.h> |
| #include <lib/fidl/llcpp/array.h> |
| #include <lib/fidl/llcpp/buffer_allocator.h> |
| #include <lib/fidl/llcpp/buffer_then_heap_allocator.h> |
| #include <lib/fidl/llcpp/coding.h> |
| #include <lib/fidl/llcpp/envelope.h> |
| #include <lib/fidl/llcpp/errors.h> |
| #include <lib/fidl/llcpp/linearized_and_encoded.h> |
| #include <lib/fidl/llcpp/memory.h> |
| #include <lib/fidl/llcpp/string_view.h> |
| #include <lib/fidl/llcpp/tracking_ptr.h> |
| #include <lib/fidl/llcpp/traits.h> |
| #include <lib/fidl/llcpp/vector_view.h> |
| #include <lib/fit/function.h> |
| #include <lib/fit/optional.h> |
| |
| #include <variant> |
| #ifdef __Fuchsia__ |
| #include <lib/fidl/llcpp/client.h> |
| #include <lib/fidl/llcpp/connect_service.h> |
| #include <lib/fidl/llcpp/message.h> |
| #include <lib/fidl/llcpp/result.h> |
| #include <lib/fidl/llcpp/server.h> |
| #include <lib/fidl/llcpp/service_handler_interface.h> |
| #include <lib/fidl/llcpp/sync_call.h> |
| #include <lib/fidl/llcpp/transaction.h> |
| #include <lib/fidl/txn_header.h> |
| #include <lib/zx/handle.h> |
| #endif // __Fuchsia__ |
| #include <zircon/fidl.h> |
| |
| namespace llcpp { |
| |
| namespace fidl { |
| namespace test { |
| namespace encapsulatedstructs { |
| |
| struct NonInlineStructTestStruct; |
| struct Int8Int32; |
| struct Int16Int8; |
| struct ArrayInt16Int8; |
| struct StructPaddingTestStruct; |
| struct TopLevelStruct; |
| |
| extern "C" const fidl_type_t |
| fidl_test_encapsulatedstructs_NonInlineStructTestStructTable; |
| |
| struct NonInlineStructTestStruct { |
| static constexpr const fidl_type_t* Type = |
| &fidl_test_encapsulatedstructs_NonInlineStructTestStructTable; |
| static constexpr uint32_t MaxNumHandles = 1; |
| static constexpr uint32_t PrimarySize = 16; |
| [[maybe_unused]] static constexpr uint32_t MaxOutOfLine = 8; |
| static constexpr bool HasPointer = true; |
| static constexpr bool IsResource = true; |
| |
| ::fidl::tracking_ptr<::llcpp::fidl::test::encapsulatedstructs::Int16Int8> |
| element = {}; |
| |
| ::zx::handle h = {}; |
| void _CloseHandles(); |
| }; |
| |
| extern "C" const fidl_type_t fidl_test_encapsulatedstructs_Int8Int32Table; |
| |
| struct Int8Int32 { |
| static constexpr const fidl_type_t* Type = |
| &fidl_test_encapsulatedstructs_Int8Int32Table; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 8; |
| [[maybe_unused]] static constexpr uint32_t MaxOutOfLine = 0; |
| static constexpr bool HasPointer = false; |
| static constexpr bool IsResource = false; |
| |
| int8_t a = {}; |
| |
| int32_t b = {}; |
| void _CloseHandles(); |
| }; |
| |
| extern "C" const fidl_type_t fidl_test_encapsulatedstructs_Int16Int8Table; |
| |
| struct Int16Int8 { |
| static constexpr const fidl_type_t* Type = |
| &fidl_test_encapsulatedstructs_Int16Int8Table; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 4; |
| [[maybe_unused]] static constexpr uint32_t MaxOutOfLine = 0; |
| static constexpr bool HasPointer = false; |
| static constexpr bool IsResource = false; |
| |
| int16_t a = {}; |
| |
| int8_t b = {}; |
| void _CloseHandles(); |
| }; |
| |
| extern "C" const fidl_type_t fidl_test_encapsulatedstructs_ArrayInt16Int8Table; |
| |
| struct ArrayInt16Int8 { |
| static constexpr const fidl_type_t* Type = |
| &fidl_test_encapsulatedstructs_ArrayInt16Int8Table; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 12; |
| [[maybe_unused]] static constexpr uint32_t MaxOutOfLine = 0; |
| static constexpr bool HasPointer = false; |
| static constexpr bool IsResource = false; |
| |
| ::fidl::Array<::llcpp::fidl::test::encapsulatedstructs::Int16Int8, 3> arr = |
| {}; |
| void _CloseHandles(); |
| }; |
| |
| extern "C" const fidl_type_t |
| fidl_test_encapsulatedstructs_StructPaddingTestStructTable; |
| |
| struct StructPaddingTestStruct { |
| static constexpr const fidl_type_t* Type = |
| &fidl_test_encapsulatedstructs_StructPaddingTestStructTable; |
| static constexpr uint32_t MaxNumHandles = 0; |
| static constexpr uint32_t PrimarySize = 24; |
| [[maybe_unused]] static constexpr uint32_t MaxOutOfLine = 0; |
| static constexpr bool HasPointer = false; |
| static constexpr bool IsResource = false; |
| |
| ::llcpp::fidl::test::encapsulatedstructs::Int16Int8 trailing = {}; |
| |
| ::llcpp::fidl::test::encapsulatedstructs::Int8Int32 inner = {}; |
| |
| ::llcpp::fidl::test::encapsulatedstructs::ArrayInt16Int8 array = {}; |
| void _CloseHandles(); |
| }; |
| |
| extern "C" const fidl_type_t fidl_test_encapsulatedstructs_TopLevelStructTable; |
| |
| struct TopLevelStruct { |
| static constexpr const fidl_type_t* Type = |
| &fidl_test_encapsulatedstructs_TopLevelStructTable; |
| static constexpr uint32_t MaxNumHandles = 1; |
| static constexpr uint32_t PrimarySize = 40; |
| [[maybe_unused]] static constexpr uint32_t MaxOutOfLine = 8; |
| static constexpr bool HasPointer = true; |
| static constexpr bool IsResource = true; |
| |
| ::llcpp::fidl::test::encapsulatedstructs::StructPaddingTestStruct a = {}; |
| |
| ::llcpp::fidl::test::encapsulatedstructs::NonInlineStructTestStruct b = {}; |
| void _CloseHandles(); |
| }; |
| |
| } // namespace encapsulatedstructs |
| } // namespace test |
| } // namespace fidl |
| } // namespace llcpp |
| |
| namespace fidl { |
| |
| template <> |
| struct IsFidlType< |
| ::llcpp::fidl::test::encapsulatedstructs::NonInlineStructTestStruct> |
| : public std::true_type {}; |
| template <> |
| struct IsStruct< |
| ::llcpp::fidl::test::encapsulatedstructs::NonInlineStructTestStruct> |
| : public std::true_type {}; |
| static_assert( |
| std::is_standard_layout_v< |
| ::llcpp::fidl::test::encapsulatedstructs::NonInlineStructTestStruct>); |
| static_assert( |
| offsetof( |
| ::llcpp::fidl::test::encapsulatedstructs::NonInlineStructTestStruct, |
| element) == 0); |
| static_assert( |
| offsetof( |
| ::llcpp::fidl::test::encapsulatedstructs::NonInlineStructTestStruct, |
| h) == 8); |
| static_assert( |
| sizeof( |
| ::llcpp::fidl::test::encapsulatedstructs::NonInlineStructTestStruct) == |
| ::llcpp::fidl::test::encapsulatedstructs::NonInlineStructTestStruct:: |
| PrimarySize); |
| |
| template <> |
| struct IsFidlType<::llcpp::fidl::test::encapsulatedstructs::Int8Int32> |
| : public std::true_type {}; |
| template <> |
| struct IsStruct<::llcpp::fidl::test::encapsulatedstructs::Int8Int32> |
| : public std::true_type {}; |
| static_assert(std::is_standard_layout_v< |
| ::llcpp::fidl::test::encapsulatedstructs::Int8Int32>); |
| static_assert(offsetof(::llcpp::fidl::test::encapsulatedstructs::Int8Int32, |
| a) == 0); |
| static_assert(offsetof(::llcpp::fidl::test::encapsulatedstructs::Int8Int32, |
| b) == 4); |
| static_assert(sizeof(::llcpp::fidl::test::encapsulatedstructs::Int8Int32) == |
| ::llcpp::fidl::test::encapsulatedstructs::Int8Int32::PrimarySize); |
| |
| template <> |
| struct IsFidlType<::llcpp::fidl::test::encapsulatedstructs::Int16Int8> |
| : public std::true_type {}; |
| template <> |
| struct IsStruct<::llcpp::fidl::test::encapsulatedstructs::Int16Int8> |
| : public std::true_type {}; |
| static_assert(std::is_standard_layout_v< |
| ::llcpp::fidl::test::encapsulatedstructs::Int16Int8>); |
| static_assert(offsetof(::llcpp::fidl::test::encapsulatedstructs::Int16Int8, |
| a) == 0); |
| static_assert(offsetof(::llcpp::fidl::test::encapsulatedstructs::Int16Int8, |
| b) == 2); |
| static_assert(sizeof(::llcpp::fidl::test::encapsulatedstructs::Int16Int8) == |
| ::llcpp::fidl::test::encapsulatedstructs::Int16Int8::PrimarySize); |
| |
| template <> |
| struct IsFidlType<::llcpp::fidl::test::encapsulatedstructs::ArrayInt16Int8> |
| : public std::true_type {}; |
| template <> |
| struct IsStruct<::llcpp::fidl::test::encapsulatedstructs::ArrayInt16Int8> |
| : public std::true_type {}; |
| static_assert(std::is_standard_layout_v< |
| ::llcpp::fidl::test::encapsulatedstructs::ArrayInt16Int8>); |
| static_assert(offsetof(::llcpp::fidl::test::encapsulatedstructs::ArrayInt16Int8, |
| arr) == 0); |
| static_assert( |
| sizeof(::llcpp::fidl::test::encapsulatedstructs::ArrayInt16Int8) == |
| ::llcpp::fidl::test::encapsulatedstructs::ArrayInt16Int8::PrimarySize); |
| |
| template <> |
| struct IsFidlType< |
| ::llcpp::fidl::test::encapsulatedstructs::StructPaddingTestStruct> |
| : public std::true_type {}; |
| template <> |
| struct IsStruct< |
| ::llcpp::fidl::test::encapsulatedstructs::StructPaddingTestStruct> |
| : public std::true_type {}; |
| static_assert( |
| std::is_standard_layout_v< |
| ::llcpp::fidl::test::encapsulatedstructs::StructPaddingTestStruct>); |
| static_assert( |
| offsetof(::llcpp::fidl::test::encapsulatedstructs::StructPaddingTestStruct, |
| trailing) == 0); |
| static_assert( |
| offsetof(::llcpp::fidl::test::encapsulatedstructs::StructPaddingTestStruct, |
| inner) == 4); |
| static_assert( |
| offsetof(::llcpp::fidl::test::encapsulatedstructs::StructPaddingTestStruct, |
| array) == 12); |
| static_assert( |
| sizeof(::llcpp::fidl::test::encapsulatedstructs::StructPaddingTestStruct) == |
| ::llcpp::fidl::test::encapsulatedstructs::StructPaddingTestStruct:: |
| PrimarySize); |
| |
| template <> |
| struct IsFidlType<::llcpp::fidl::test::encapsulatedstructs::TopLevelStruct> |
| : public std::true_type {}; |
| template <> |
| struct IsStruct<::llcpp::fidl::test::encapsulatedstructs::TopLevelStruct> |
| : public std::true_type {}; |
| static_assert(std::is_standard_layout_v< |
| ::llcpp::fidl::test::encapsulatedstructs::TopLevelStruct>); |
| static_assert(offsetof(::llcpp::fidl::test::encapsulatedstructs::TopLevelStruct, |
| a) == 0); |
| static_assert(offsetof(::llcpp::fidl::test::encapsulatedstructs::TopLevelStruct, |
| b) == 24); |
| static_assert( |
| sizeof(::llcpp::fidl::test::encapsulatedstructs::TopLevelStruct) == |
| ::llcpp::fidl::test::encapsulatedstructs::TopLevelStruct::PrimarySize); |
| |
| } // namespace fidl |
| |
| namespace llcpp { |
| |
| namespace fidl { |
| namespace test { |
| namespace encapsulatedstructs {} // namespace encapsulatedstructs |
| } // namespace test |
| } // namespace fidl |
| } // namespace llcpp |