blob: 58f863f222ae8f174465cc2b41c50ac09bd48901 [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__
#endif // __Fuchsia__
#include <fidl/test.struct/cpp/common_types.h>
#include <fidl/test.struct/cpp/markers.h>
namespace test_struct {
namespace wire {
struct Simple;
struct BasicStruct;
extern "C" const fidl_type_t test_struct_SimpleTable;
struct Simple {
uint8_t f1 = {};
bool f2 = {};
};
extern "C" const fidl_type_t test_struct_BasicStructTable;
struct BasicStruct {
uint32_t x = {};
::fidl::StringView y = {};
};
} // namespace wire
} // namespace test_struct
namespace fidl {
template <>
struct TypeTraits<::test_struct::wire::Simple> {
static constexpr const fidl_type_t* kType =
&::test_struct::wire::test_struct_SimpleTable;
static constexpr uint32_t kMaxNumHandles = 0;
static constexpr uint32_t kPrimarySize = 2;
static constexpr uint32_t kPrimarySizeV1 = 2;
[[maybe_unused]] static constexpr uint32_t kMaxOutOfLine = 0;
static constexpr uint32_t kMaxOutOfLineV1 = 0;
static constexpr bool kHasPointer = false;
};
template <>
struct IsFidlType<::test_struct::wire::Simple> : public std::true_type {};
template <>
struct IsStruct<::test_struct::wire::Simple> : public std::true_type {};
static_assert(std::is_standard_layout_v<::test_struct::wire::Simple>);
static_assert(offsetof(::test_struct::wire::Simple, f1) == 0);
static_assert(offsetof(::test_struct::wire::Simple, f2) == 1);
static_assert(sizeof(::test_struct::wire::Simple) ==
TypeTraits<::test_struct::wire::Simple>::kPrimarySize);
template <>
struct TypeTraits<::test_struct::wire::BasicStruct> {
static constexpr const fidl_type_t* kType =
&::test_struct::wire::test_struct_BasicStructTable;
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 = 4294967295;
static constexpr uint32_t kMaxOutOfLineV1 = 4294967295;
static constexpr bool kHasPointer = true;
};
template <>
struct IsFidlType<::test_struct::wire::BasicStruct> : public std::true_type {};
template <>
struct IsStruct<::test_struct::wire::BasicStruct> : public std::true_type {};
static_assert(std::is_standard_layout_v<::test_struct::wire::BasicStruct>);
static_assert(offsetof(::test_struct::wire::BasicStruct, x) == 0);
static_assert(offsetof(::test_struct::wire::BasicStruct, y) == 8);
static_assert(sizeof(::test_struct::wire::BasicStruct) ==
TypeTraits<::test_struct::wire::BasicStruct>::kPrimarySize);
} // namespace fidl