blob: 4cae2ef69cc4004fbceb1c6b3dd3682030c6c413 [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
// fidl_experiment = output_index_json
#pragma once
#include <fidl/test.importedconstvalues/cpp/common_types.h>
#include <fidl/test.importedconstvalues/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.dependent/cpp/natural_types.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
namespace test_importedconstvalues {
class MyStruct;
constexpr ::test_dependent::MyBits kBitsMember = ::test_dependent::MyBits::kMember;
constexpr ::test_dependent::MyEnum kEnumMember = ::test_dependent::MyEnum::kMember;
class MyStruct {
private:
struct Storage_;
public:
MyStruct(Storage_ storage) noexcept;
MyStruct(uint8_t __reserved) noexcept;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
// Default constructs a |MyStruct| only if all of its members are default constructible.
MyStruct() = default;
#pragma clang diagnostic pop
MyStruct(MyStruct&&) noexcept = default;
MyStruct& operator=(MyStruct&&) noexcept = default;
MyStruct(const MyStruct& other) noexcept;
MyStruct& operator=(const MyStruct& other) noexcept;
bool operator==(const MyStruct& other) const noexcept {
return ::fidl::internal::NaturalStructCodingTraits<::test_importedconstvalues::MyStruct, 1>::Equal(this, &other);
}
bool operator!=(const MyStruct& other) const noexcept {
return !::fidl::internal::NaturalStructCodingTraits<::test_importedconstvalues::MyStruct, 1>::Equal(this, &other);
}
uint8_t
__reserved() const {
return storage_.__reserved;
}
uint8_t& __reserved() {
return storage_.__reserved;
}
// Setter for __reserved.
//
MyStruct& __reserved(uint8_t value);
MyStruct(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag);
private:
struct Storage_ final {
uint8_t __reserved = 0u;
};
Storage_ storage_;
Storage_ CloneStorage_() const;
friend struct ::fidl::internal::NaturalStructCodingTraits<::test_importedconstvalues::MyStruct, 1>;
friend struct ::fidl::internal::MemberVisitor<::test_importedconstvalues::MyStruct>;
static constexpr auto kMembers = std::make_tuple(::fidl::internal::NaturalStructMember<Storage_, uint8_t, fidl::internal::NaturalCodingConstraintEmpty>{
&Storage_::__reserved, 0});
static constexpr auto kPadding = std::make_tuple();
};
inline MyStruct::MyStruct(Storage_ storage) noexcept : storage_(std::move(storage)) {}
inline MyStruct::MyStruct(uint8_t __reserved) noexcept
: storage_({.__reserved = std::move(__reserved)}) {}
inline MyStruct::MyStruct(const ::test_importedconstvalues::MyStruct& other) noexcept : ::test_importedconstvalues::MyStruct(other.CloneStorage_()) {}
inline MyStruct& ::test_importedconstvalues::MyStruct::operator=(const ::test_importedconstvalues::MyStruct & other) noexcept {
storage_ = other.CloneStorage_();
return *this;
}
inline MyStruct::MyStruct(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag) : MyStruct(Storage_{
.__reserved = 0u,
}) {}
inline MyStruct& MyStruct::__reserved(uint8_t value) {
storage_.__reserved = std::move(value);
return *this;
}
} // namespace test_importedconstvalues
namespace fidl {
template <>
struct IsFidlType<::test_importedconstvalues::MyStruct> : public std::true_type {};
template <>
struct TypeTraits<::test_importedconstvalues::MyStruct> {
static constexpr uint32_t kMaxNumHandles = 0;
static constexpr uint32_t kMaxDepth = 0;
static constexpr uint32_t kPrimarySize = 1;
static constexpr uint32_t kMaxOutOfLine = 0;
static constexpr bool kHasPointer = false;
};
template <>
struct IsStruct<::test_importedconstvalues::MyStruct> : public std::true_type {};
template <>
struct internal::NaturalCodingTraits<::test_importedconstvalues::MyStruct, ::fidl::internal::NaturalCodingConstraintEmpty> final
: public ::fidl::internal::NaturalEmptyStructCodingTraits<::test_importedconstvalues::MyStruct> {};
#pragma clang diagnostic pop
} // namespace fidl