blob: d6eddae100a36e35b344be40cb59af196fddc86e [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
#pragma once
#include <lib/fidl/llcpp/array.h>
#include <lib/fidl/llcpp/coding.h>
#include <lib/fidl/llcpp/envelope.h>
#include <lib/fidl/llcpp/message.h>
#include <lib/fidl/llcpp/message_storage.h>
#include <lib/fidl/llcpp/object_view.h>
#include <lib/fidl/llcpp/string_view.h>
#include <lib/fidl/llcpp/traits.h>
#include <lib/fidl/llcpp/wire_types.h>
#include <lib/stdcompat/optional.h>
#include <cinttypes>
#ifdef __Fuchsia__
#include <lib/zx/handle.h>
#endif // __Fuchsia__
#include <fidl/test.encapsulatedstructs/cpp/common_types.h>
#include <fidl/test.encapsulatedstructs/cpp/markers.h>
namespace test_encapsulatedstructs {
namespace wire {
struct NonInlineStructTestStruct;
struct Int8Int32;
struct Int16Int8;
struct ArrayInt16Int8;
struct StructPaddingTestStruct;
struct TopLevelStruct;
extern "C" const fidl_type_t test_encapsulatedstructs_Int16Int8Table;
struct Int16Int8 {
int16_t a = {};
int8_t b = {};
};
#ifdef __Fuchsia__
extern "C" const fidl_type_t
test_encapsulatedstructs_NonInlineStructTestStructTable;
struct NonInlineStructTestStruct {
::fidl::ObjectView<::test_encapsulatedstructs::wire::Int16Int8> element = {};
::zx::handle h = {};
void _CloseHandles();
};
#endif // __Fuchsia__
extern "C" const fidl_type_t test_encapsulatedstructs_Int8Int32Table;
struct Int8Int32 {
int8_t a = {};
int32_t b = {};
};
extern "C" const fidl_type_t test_encapsulatedstructs_ArrayInt16Int8Table;
struct ArrayInt16Int8 {
::fidl::Array<::test_encapsulatedstructs::wire::Int16Int8, 3> arr = {};
};
extern "C" const fidl_type_t
test_encapsulatedstructs_StructPaddingTestStructTable;
struct StructPaddingTestStruct {
::test_encapsulatedstructs::wire::Int16Int8 trailing = {};
::test_encapsulatedstructs::wire::Int8Int32 inner = {};
::test_encapsulatedstructs::wire::ArrayInt16Int8 array = {};
};
#ifdef __Fuchsia__
extern "C" const fidl_type_t test_encapsulatedstructs_TopLevelStructTable;
struct TopLevelStruct {
::test_encapsulatedstructs::wire::StructPaddingTestStruct a = {};
::test_encapsulatedstructs::wire::NonInlineStructTestStruct b = {};
void _CloseHandles();
};
#endif // __Fuchsia__
} // namespace wire
} // namespace test_encapsulatedstructs
namespace fidl {
#ifdef __Fuchsia__
template <>
struct IsResource<::test_encapsulatedstructs::wire::NonInlineStructTestStruct>
: public std::true_type {};
template <>
struct TypeTraits<::test_encapsulatedstructs::wire::NonInlineStructTestStruct> {
static constexpr const fidl_type_t* kType =
&::test_encapsulatedstructs::wire::
test_encapsulatedstructs_NonInlineStructTestStructTable;
static constexpr uint32_t kMaxNumHandles = 1;
static constexpr uint32_t kPrimarySize = 16;
static constexpr uint32_t kPrimarySizeV1 = 16;
[[maybe_unused]] static constexpr uint32_t kMaxOutOfLine = 8;
static constexpr uint32_t kMaxOutOfLineV1 = 8;
static constexpr bool kHasPointer = true;
};
template <>
struct IsFidlType<::test_encapsulatedstructs::wire::NonInlineStructTestStruct>
: public std::true_type {};
template <>
struct IsStruct<::test_encapsulatedstructs::wire::NonInlineStructTestStruct>
: public std::true_type {};
static_assert(std::is_standard_layout_v<
::test_encapsulatedstructs::wire::NonInlineStructTestStruct>);
static_assert(
offsetof(::test_encapsulatedstructs::wire::NonInlineStructTestStruct,
element) == 0);
static_assert(
offsetof(::test_encapsulatedstructs::wire::NonInlineStructTestStruct, h) ==
8);
static_assert(
sizeof(::test_encapsulatedstructs::wire::NonInlineStructTestStruct) ==
TypeTraits<::test_encapsulatedstructs::wire::NonInlineStructTestStruct>::
kPrimarySize);
#endif // __Fuchsia__
template <>
struct TypeTraits<::test_encapsulatedstructs::wire::Int8Int32> {
static constexpr const fidl_type_t* kType =
&::test_encapsulatedstructs::wire::
test_encapsulatedstructs_Int8Int32Table;
static constexpr uint32_t kMaxNumHandles = 0;
static constexpr uint32_t kPrimarySize = 8;
static constexpr uint32_t kPrimarySizeV1 = 8;
[[maybe_unused]] static constexpr uint32_t kMaxOutOfLine = 0;
static constexpr uint32_t kMaxOutOfLineV1 = 0;
static constexpr bool kHasPointer = false;
};
template <>
struct IsFidlType<::test_encapsulatedstructs::wire::Int8Int32>
: public std::true_type {};
template <>
struct IsStruct<::test_encapsulatedstructs::wire::Int8Int32>
: public std::true_type {};
static_assert(
std::is_standard_layout_v<::test_encapsulatedstructs::wire::Int8Int32>);
static_assert(offsetof(::test_encapsulatedstructs::wire::Int8Int32, a) == 0);
static_assert(offsetof(::test_encapsulatedstructs::wire::Int8Int32, b) == 4);
static_assert(
sizeof(::test_encapsulatedstructs::wire::Int8Int32) ==
TypeTraits<::test_encapsulatedstructs::wire::Int8Int32>::kPrimarySize);
template <>
struct TypeTraits<::test_encapsulatedstructs::wire::Int16Int8> {
static constexpr const fidl_type_t* kType =
&::test_encapsulatedstructs::wire::
test_encapsulatedstructs_Int16Int8Table;
static constexpr uint32_t kMaxNumHandles = 0;
static constexpr uint32_t kPrimarySize = 4;
static constexpr uint32_t kPrimarySizeV1 = 4;
[[maybe_unused]] static constexpr uint32_t kMaxOutOfLine = 0;
static constexpr uint32_t kMaxOutOfLineV1 = 0;
static constexpr bool kHasPointer = false;
};
template <>
struct IsFidlType<::test_encapsulatedstructs::wire::Int16Int8>
: public std::true_type {};
template <>
struct IsStruct<::test_encapsulatedstructs::wire::Int16Int8>
: public std::true_type {};
static_assert(
std::is_standard_layout_v<::test_encapsulatedstructs::wire::Int16Int8>);
static_assert(offsetof(::test_encapsulatedstructs::wire::Int16Int8, a) == 0);
static_assert(offsetof(::test_encapsulatedstructs::wire::Int16Int8, b) == 2);
static_assert(
sizeof(::test_encapsulatedstructs::wire::Int16Int8) ==
TypeTraits<::test_encapsulatedstructs::wire::Int16Int8>::kPrimarySize);
template <>
struct TypeTraits<::test_encapsulatedstructs::wire::ArrayInt16Int8> {
static constexpr const fidl_type_t* kType =
&::test_encapsulatedstructs::wire::
test_encapsulatedstructs_ArrayInt16Int8Table;
static constexpr uint32_t kMaxNumHandles = 0;
static constexpr uint32_t kPrimarySize = 12;
static constexpr uint32_t kPrimarySizeV1 = 12;
[[maybe_unused]] static constexpr uint32_t kMaxOutOfLine = 0;
static constexpr uint32_t kMaxOutOfLineV1 = 0;
static constexpr bool kHasPointer = false;
};
template <>
struct IsFidlType<::test_encapsulatedstructs::wire::ArrayInt16Int8>
: public std::true_type {};
template <>
struct IsStruct<::test_encapsulatedstructs::wire::ArrayInt16Int8>
: public std::true_type {};
static_assert(std::is_standard_layout_v<
::test_encapsulatedstructs::wire::ArrayInt16Int8>);
static_assert(offsetof(::test_encapsulatedstructs::wire::ArrayInt16Int8, arr) ==
0);
static_assert(
sizeof(::test_encapsulatedstructs::wire::ArrayInt16Int8) ==
TypeTraits<::test_encapsulatedstructs::wire::ArrayInt16Int8>::kPrimarySize);
template <>
struct TypeTraits<::test_encapsulatedstructs::wire::StructPaddingTestStruct> {
static constexpr const fidl_type_t* kType =
&::test_encapsulatedstructs::wire::
test_encapsulatedstructs_StructPaddingTestStructTable;
static constexpr uint32_t kMaxNumHandles = 0;
static constexpr uint32_t kPrimarySize = 24;
static constexpr uint32_t kPrimarySizeV1 = 24;
[[maybe_unused]] static constexpr uint32_t kMaxOutOfLine = 0;
static constexpr uint32_t kMaxOutOfLineV1 = 0;
static constexpr bool kHasPointer = false;
};
template <>
struct IsFidlType<::test_encapsulatedstructs::wire::StructPaddingTestStruct>
: public std::true_type {};
template <>
struct IsStruct<::test_encapsulatedstructs::wire::StructPaddingTestStruct>
: public std::true_type {};
static_assert(std::is_standard_layout_v<
::test_encapsulatedstructs::wire::StructPaddingTestStruct>);
static_assert(
offsetof(::test_encapsulatedstructs::wire::StructPaddingTestStruct,
trailing) == 0);
static_assert(
offsetof(::test_encapsulatedstructs::wire::StructPaddingTestStruct,
inner) == 4);
static_assert(
offsetof(::test_encapsulatedstructs::wire::StructPaddingTestStruct,
array) == 12);
static_assert(
sizeof(::test_encapsulatedstructs::wire::StructPaddingTestStruct) ==
TypeTraits<::test_encapsulatedstructs::wire::StructPaddingTestStruct>::
kPrimarySize);
#ifdef __Fuchsia__
template <>
struct IsResource<::test_encapsulatedstructs::wire::TopLevelStruct>
: public std::true_type {};
template <>
struct TypeTraits<::test_encapsulatedstructs::wire::TopLevelStruct> {
static constexpr const fidl_type_t* kType =
&::test_encapsulatedstructs::wire::
test_encapsulatedstructs_TopLevelStructTable;
static constexpr uint32_t kMaxNumHandles = 1;
static constexpr uint32_t kPrimarySize = 40;
static constexpr uint32_t kPrimarySizeV1 = 40;
[[maybe_unused]] static constexpr uint32_t kMaxOutOfLine = 8;
static constexpr uint32_t kMaxOutOfLineV1 = 8;
static constexpr bool kHasPointer = true;
};
template <>
struct IsFidlType<::test_encapsulatedstructs::wire::TopLevelStruct>
: public std::true_type {};
template <>
struct IsStruct<::test_encapsulatedstructs::wire::TopLevelStruct>
: public std::true_type {};
static_assert(std::is_standard_layout_v<
::test_encapsulatedstructs::wire::TopLevelStruct>);
static_assert(offsetof(::test_encapsulatedstructs::wire::TopLevelStruct, a) ==
0);
static_assert(offsetof(::test_encapsulatedstructs::wire::TopLevelStruct, b) ==
24);
static_assert(
sizeof(::test_encapsulatedstructs::wire::TopLevelStruct) ==
TypeTraits<::test_encapsulatedstructs::wire::TopLevelStruct>::kPrimarySize);
#endif // __Fuchsia__
} // namespace fidl