blob: bce9120a5dda47cd9f25b18cfb44be1875086ee7 [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
// fidl_experiment = output_index_json
#pragma once
#include <fidl/test.exampleusing/cpp/hlcpp_conversion.h>
#include <fidl/test.placementofattributes/cpp/natural_types.h>
#include <lib/fidl/cpp/hlcpp_conversion.h>
#include <lib/fidl/cpp/wire/service_handler.h>
#include <test/placementofattributes/cpp/fidl.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
namespace fidl {
namespace internal {
template <>
struct NaturalToHLCPPTraits<::test_placementofattributes::ExampleEnum> : public NaturalToHLCPPTraitsEnum<::test_placementofattributes::ExampleEnum, ::test::placementofattributes::ExampleEnum, uint32_t> {};
template <>
struct HLCPPToNaturalTraits<::test::placementofattributes::ExampleEnum> : public HLCPPToNaturalTraitsEnum<::test::placementofattributes::ExampleEnum, ::test_placementofattributes::ExampleEnum> {};
template <>
struct NaturalToHLCPPTraits<::test_placementofattributes::ExampleBits> : public NaturalToHLCPPTraitsBits<::test_placementofattributes::ExampleBits, ::test::placementofattributes::ExampleBits, uint32_t> {};
template <>
struct HLCPPToNaturalTraits<::test::placementofattributes::ExampleBits> : public HLCPPToNaturalTraitsBits<::test::placementofattributes::ExampleBits, ::test_placementofattributes::ExampleBits, uint32_t> {};
template <>
struct NaturalToHLCPPTraits<fidl::ClientEnd<::test_placementofattributes::ExampleProtocol>> {
using HLCPPType = fidl::InterfaceHandle<::test::placementofattributes::ExampleProtocol>;
static inline fidl::InterfaceHandle<::test::placementofattributes::ExampleProtocol> Convert(fidl::ClientEnd<::test_placementofattributes::ExampleProtocol>&& c) {
return fidl::InterfaceHandle<::test::placementofattributes::ExampleProtocol>(c.TakeChannel());
}
};
template <>
struct NaturalToHLCPPTraits<fidl::ServerEnd<::test_placementofattributes::ExampleProtocol>> {
using HLCPPType = fidl::InterfaceRequest<::test::placementofattributes::ExampleProtocol>;
static inline fidl::InterfaceRequest<::test::placementofattributes::ExampleProtocol> Convert(fidl::ServerEnd<::test_placementofattributes::ExampleProtocol>&& c) {
return fidl::InterfaceRequest<::test::placementofattributes::ExampleProtocol>(c.TakeChannel());
}
};
template <>
struct HLCPPToNaturalTraits<fidl::InterfaceHandle<::test::placementofattributes::ExampleProtocol>> {
using NaturalType = fidl::ClientEnd<::test_placementofattributes::ExampleProtocol>;
static inline fidl::ClientEnd<::test_placementofattributes::ExampleProtocol> Convert(fidl::InterfaceHandle<::test::placementofattributes::ExampleProtocol>&& c) {
return fidl::ClientEnd<::test_placementofattributes::ExampleProtocol>(c.TakeChannel());
}
};
template <>
struct HLCPPToNaturalTraits<fidl::InterfaceRequest<::test::placementofattributes::ExampleProtocol>> {
using NaturalType = fidl::ServerEnd<::test_placementofattributes::ExampleProtocol>;
static inline fidl::ServerEnd<::test_placementofattributes::ExampleProtocol> Convert(fidl::InterfaceRequest<::test::placementofattributes::ExampleProtocol>&& c) {
return fidl::ServerEnd<::test_placementofattributes::ExampleProtocol>(c.TakeChannel());
}
};
template <>
struct NaturalToHLCPPTraits<fidl::ProtocolHandler<::test_placementofattributes::ExampleProtocol>> {
using HLCPPType = fidl::InterfaceRequestHandler<::test::placementofattributes::ExampleProtocol>;
static inline fidl::InterfaceRequestHandler<::test::placementofattributes::ExampleProtocol> Convert(fidl::ProtocolHandler<::test_placementofattributes::ExampleProtocol>&& c) {
return [c = std::move(c)](fidl::InterfaceRequest<::test::placementofattributes::ExampleProtocol> r) {
c(::fidl::HLCPPToNatural(r));
};
}
};
template <>
struct HLCPPToNaturalTraits<fidl::InterfaceRequestHandler<::test::placementofattributes::ExampleProtocol>> {
using NaturalType = fidl::ProtocolHandler<::test_placementofattributes::ExampleProtocol>;
static inline fidl::ProtocolHandler<::test_placementofattributes::ExampleProtocol> Convert(fidl::InterfaceRequestHandler<::test::placementofattributes::ExampleProtocol>&& c) {
return [c = std::move(c)](fidl::ServerEnd<::test_placementofattributes::ExampleProtocol> r) {
c(::fidl::NaturalToHLCPP(r));
};
}
};
template <>
struct NaturalToHLCPPTraits<::test_placementofattributes::ExampleProtocolMethodRequest> {
using HLCPPType = ::test::placementofattributes::ExampleProtocolMethodRequest;
static inline ::test::placementofattributes::ExampleProtocolMethodRequest Convert(::test_placementofattributes::ExampleProtocolMethodRequest&&);
};
template <>
struct HLCPPToNaturalTraits<::test::placementofattributes::ExampleProtocolMethodRequest> {
using NaturalType = ::test_placementofattributes::ExampleProtocolMethodRequest;
static inline ::test_placementofattributes::ExampleProtocolMethodRequest Convert(::test::placementofattributes::ExampleProtocolMethodRequest&&);
};
template <>
struct NaturalToHLCPPTraits<::test_placementofattributes::ExampleStruct> {
using HLCPPType = ::test::placementofattributes::ExampleStruct;
static inline ::test::placementofattributes::ExampleStruct Convert(::test_placementofattributes::ExampleStruct&&);
};
template <>
struct HLCPPToNaturalTraits<::test::placementofattributes::ExampleStruct> {
using NaturalType = ::test_placementofattributes::ExampleStruct;
static inline ::test_placementofattributes::ExampleStruct Convert(::test::placementofattributes::ExampleStruct&&);
};
template <>
struct NaturalToHLCPPTraits<::test_placementofattributes::ExampleTable> {
using HLCPPType = ::test::placementofattributes::ExampleTable;
static inline ::test::placementofattributes::ExampleTable Convert(::test_placementofattributes::ExampleTable&&);
};
template <>
struct HLCPPToNaturalTraits<::test::placementofattributes::ExampleTable> {
using NaturalType = ::test_placementofattributes::ExampleTable;
static inline ::test_placementofattributes::ExampleTable Convert(::test::placementofattributes::ExampleTable&&);
};
template <>
struct NaturalToHLCPPTraits<::test_placementofattributes::ExampleUnion> {
using HLCPPType = ::test::placementofattributes::ExampleUnion;
static inline ::test::placementofattributes::ExampleUnion Convert(::test_placementofattributes::ExampleUnion&&);
};
template <>
struct HLCPPToNaturalTraits<::test::placementofattributes::ExampleUnion> {
using NaturalType = ::test_placementofattributes::ExampleUnion;
static inline ::test_placementofattributes::ExampleUnion Convert(::test::placementofattributes::ExampleUnion&&);
};
::test::placementofattributes::ExampleProtocolMethodRequest NaturalToHLCPPTraits<::test_placementofattributes::ExampleProtocolMethodRequest>::Convert(::test_placementofattributes::ExampleProtocolMethodRequest&& value) {
::test::placementofattributes::ExampleProtocolMethodRequest hlcpp;
hlcpp.arg = ::fidl::NaturalToHLCPP(std::move(value.arg()));
return hlcpp;
}
::test_placementofattributes::ExampleProtocolMethodRequest HLCPPToNaturalTraits<::test::placementofattributes::ExampleProtocolMethodRequest>::Convert(::test::placementofattributes::ExampleProtocolMethodRequest&& value) {
return ::test_placementofattributes::ExampleProtocolMethodRequest{{
.arg = ::fidl::HLCPPToNatural(std::move(value.arg)),
}};
}
::test::placementofattributes::ExampleStruct NaturalToHLCPPTraits<::test_placementofattributes::ExampleStruct>::Convert(::test_placementofattributes::ExampleStruct&& value) {
::test::placementofattributes::ExampleStruct hlcpp;
hlcpp.member = ::fidl::NaturalToHLCPP(std::move(value.member()));
return hlcpp;
}
::test_placementofattributes::ExampleStruct HLCPPToNaturalTraits<::test::placementofattributes::ExampleStruct>::Convert(::test::placementofattributes::ExampleStruct&& value) {
return ::test_placementofattributes::ExampleStruct{{
.member = ::fidl::HLCPPToNatural(std::move(value.member)),
}};
}
::test::placementofattributes::ExampleTable NaturalToHLCPPTraits<::test_placementofattributes::ExampleTable>::Convert(::test_placementofattributes::ExampleTable&& value) {
::test::placementofattributes::ExampleTable hlcpp;
if (value.member().has_value()) {
hlcpp.set_member(::fidl::NaturalToHLCPP(std::move(value.member().value())));
}
return hlcpp;
}
::test_placementofattributes::ExampleTable HLCPPToNaturalTraits<::test::placementofattributes::ExampleTable>::Convert(::test::placementofattributes::ExampleTable&& value) {
::test_placementofattributes::ExampleTable natural;
if (value.has_member()) {
natural.member() = ::fidl::HLCPPToNatural(std::move(*value.mutable_member()));
}
return natural;
}
::test::placementofattributes::ExampleUnion NaturalToHLCPPTraits<::test_placementofattributes::ExampleUnion>::Convert(::test_placementofattributes::ExampleUnion&& value) {
::test::placementofattributes::ExampleUnion hlcpp;
switch (value.Which()) {
case ::test_placementofattributes::ExampleUnion::Tag::kVariant:
hlcpp.set_variant(::fidl::NaturalToHLCPP(std::move(value.variant().value())));
break;
default:
break;
}
return hlcpp;
}
::test_placementofattributes::ExampleUnion HLCPPToNaturalTraits<::test::placementofattributes::ExampleUnion>::Convert(::test::placementofattributes::ExampleUnion&& value) {
using _NaturalUnion = ::test_placementofattributes::ExampleUnion;
switch (value.Which()) {
case ::test::placementofattributes::ExampleUnion::Tag::kVariant:
return _NaturalUnion::WithVariant(
::fidl::HLCPPToNatural(std::move(value.variant())));
default:
ZX_PANIC("Can't convert invalid strict union %s from HLCPP to Natural", "::test::placementofattributes::ExampleUnion");
}
}
#pragma clang diagnostic pop
} // namespace internal
} // namespace fidl