| // WARNING: This file is machine generated by fidlgen. |
| |
| #pragma once |
| |
| #include <fidl/test.emptystruct/cpp/natural_types.h> |
| #include <lib/fidl/cpp/hlcpp_conversion.h> |
| #include <lib/fidl/llcpp/internal/transport_channel.h> |
| #include <test/emptystruct/cpp/fidl.h> |
| |
| namespace fidl { |
| namespace internal { |
| |
| template <> |
| struct NaturalToHLCPPTraits<fidl::ClientEnd<::test_emptystruct::EmptyProtocol>> { |
| using HLCPPType = fidl::InterfaceHandle<::test::emptystruct::EmptyProtocol>; |
| static inline fidl::InterfaceHandle<::test::emptystruct::EmptyProtocol> Convert(fidl::ClientEnd<::test_emptystruct::EmptyProtocol>&& c) { |
| return fidl::InterfaceHandle<::test::emptystruct::EmptyProtocol>(c.TakeChannel()); |
| } |
| }; |
| |
| template <> |
| struct NaturalToHLCPPTraits<fidl::ServerEnd<::test_emptystruct::EmptyProtocol>> { |
| using HLCPPType = fidl::InterfaceRequest<::test::emptystruct::EmptyProtocol>; |
| static inline fidl::InterfaceRequest<::test::emptystruct::EmptyProtocol> Convert(fidl::ServerEnd<::test_emptystruct::EmptyProtocol>&& c) { |
| return fidl::InterfaceRequest<::test::emptystruct::EmptyProtocol>(c.TakeChannel()); |
| } |
| }; |
| |
| template <> |
| struct HLCPPToNaturalTraits<fidl::InterfaceHandle<::test::emptystruct::EmptyProtocol>> { |
| using NaturalType = fidl::ClientEnd<::test_emptystruct::EmptyProtocol>; |
| static inline fidl::ClientEnd<::test_emptystruct::EmptyProtocol> Convert(fidl::InterfaceHandle<::test::emptystruct::EmptyProtocol>&& c) { |
| return fidl::ClientEnd<::test_emptystruct::EmptyProtocol>(c.TakeChannel()); |
| } |
| }; |
| |
| template <> |
| struct HLCPPToNaturalTraits<fidl::InterfaceRequest<::test::emptystruct::EmptyProtocol>> { |
| using NaturalType = fidl::ServerEnd<::test_emptystruct::EmptyProtocol>; |
| static inline fidl::ServerEnd<::test_emptystruct::EmptyProtocol> Convert(fidl::InterfaceRequest<::test::emptystruct::EmptyProtocol>&& c) { |
| return fidl::ServerEnd<::test_emptystruct::EmptyProtocol>(c.TakeChannel()); |
| } |
| }; |
| |
| template <> |
| struct NaturalToHLCPPTraits<::test_emptystruct::Empty> { |
| using HLCPPType = ::test::emptystruct::Empty; |
| static inline ::test::emptystruct::Empty Convert(::test_emptystruct::Empty&&); |
| }; |
| template <> |
| struct HLCPPToNaturalTraits<::test::emptystruct::Empty> { |
| using NaturalType = ::test_emptystruct::Empty; |
| static inline ::test_emptystruct::Empty Convert(::test::emptystruct::Empty&&); |
| }; |
| template <> |
| struct NaturalToHLCPPTraits<::test_emptystruct::EmptyProtocolSendRequest> { |
| using HLCPPType = ::test::emptystruct::EmptyProtocolSendRequest; |
| static inline ::test::emptystruct::EmptyProtocolSendRequest Convert(::test_emptystruct::EmptyProtocolSendRequest&&); |
| }; |
| template <> |
| struct HLCPPToNaturalTraits<::test::emptystruct::EmptyProtocolSendRequest> { |
| using NaturalType = ::test_emptystruct::EmptyProtocolSendRequest; |
| static inline ::test_emptystruct::EmptyProtocolSendRequest Convert(::test::emptystruct::EmptyProtocolSendRequest&&); |
| }; |
| template <> |
| struct NaturalToHLCPPTraits<::test_emptystruct::EmptyProtocolSendAndReceiveTopResponse> { |
| using HLCPPType = ::test::emptystruct::EmptyProtocolSendAndReceiveTopResponse; |
| static inline ::test::emptystruct::EmptyProtocolSendAndReceiveTopResponse Convert(::test_emptystruct::EmptyProtocolSendAndReceiveTopResponse&&); |
| }; |
| template <> |
| struct HLCPPToNaturalTraits<::test::emptystruct::EmptyProtocolSendAndReceiveTopResponse> { |
| using NaturalType = ::test_emptystruct::EmptyProtocolSendAndReceiveTopResponse; |
| static inline ::test_emptystruct::EmptyProtocolSendAndReceiveTopResponse Convert(::test::emptystruct::EmptyProtocolSendAndReceiveTopResponse&&); |
| }; |
| template <> |
| struct NaturalToHLCPPTraits<::test_emptystruct::EmptyProtocolSendAndReceiveRequest> { |
| using HLCPPType = ::test::emptystruct::EmptyProtocolSendAndReceiveRequest; |
| static inline ::test::emptystruct::EmptyProtocolSendAndReceiveRequest Convert(::test_emptystruct::EmptyProtocolSendAndReceiveRequest&&); |
| }; |
| template <> |
| struct HLCPPToNaturalTraits<::test::emptystruct::EmptyProtocolSendAndReceiveRequest> { |
| using NaturalType = ::test_emptystruct::EmptyProtocolSendAndReceiveRequest; |
| static inline ::test_emptystruct::EmptyProtocolSendAndReceiveRequest Convert(::test::emptystruct::EmptyProtocolSendAndReceiveRequest&&); |
| }; |
| template <> |
| struct NaturalToHLCPPTraits<::test_emptystruct::EmptyProtocolReceiveRequest> { |
| using HLCPPType = ::test::emptystruct::EmptyProtocolReceiveRequest; |
| static inline ::test::emptystruct::EmptyProtocolReceiveRequest Convert(::test_emptystruct::EmptyProtocolReceiveRequest&&); |
| }; |
| template <> |
| struct HLCPPToNaturalTraits<::test::emptystruct::EmptyProtocolReceiveRequest> { |
| using NaturalType = ::test_emptystruct::EmptyProtocolReceiveRequest; |
| static inline ::test_emptystruct::EmptyProtocolReceiveRequest Convert(::test::emptystruct::EmptyProtocolReceiveRequest&&); |
| }; |
| |
| ::test::emptystruct::Empty NaturalToHLCPPTraits<::test_emptystruct::Empty>::Convert(::test_emptystruct::Empty&& value) { |
| ::test::emptystruct::Empty hlcpp; |
| hlcpp.__reserved = ::fidl::NaturalToHLCPP(std::move(value.__reserved())); |
| return hlcpp; |
| } |
| |
| ::test_emptystruct::Empty HLCPPToNaturalTraits<::test::emptystruct::Empty>::Convert(::test::emptystruct::Empty&& value) { |
| return ::test_emptystruct::Empty{{ |
| .__reserved = ::fidl::HLCPPToNatural(std::move(value.__reserved)), |
| }}; |
| } |
| ::test::emptystruct::EmptyProtocolSendRequest NaturalToHLCPPTraits<::test_emptystruct::EmptyProtocolSendRequest>::Convert(::test_emptystruct::EmptyProtocolSendRequest&& value) { |
| ::test::emptystruct::EmptyProtocolSendRequest hlcpp; |
| hlcpp.e = ::fidl::NaturalToHLCPP(std::move(value.e())); |
| return hlcpp; |
| } |
| |
| ::test_emptystruct::EmptyProtocolSendRequest HLCPPToNaturalTraits<::test::emptystruct::EmptyProtocolSendRequest>::Convert(::test::emptystruct::EmptyProtocolSendRequest&& value) { |
| return ::test_emptystruct::EmptyProtocolSendRequest{{ |
| .e = ::fidl::HLCPPToNatural(std::move(value.e)), |
| }}; |
| } |
| ::test::emptystruct::EmptyProtocolSendAndReceiveTopResponse NaturalToHLCPPTraits<::test_emptystruct::EmptyProtocolSendAndReceiveTopResponse>::Convert(::test_emptystruct::EmptyProtocolSendAndReceiveTopResponse&& value) { |
| ::test::emptystruct::EmptyProtocolSendAndReceiveTopResponse hlcpp; |
| hlcpp.e = ::fidl::NaturalToHLCPP(std::move(value.e())); |
| return hlcpp; |
| } |
| |
| ::test_emptystruct::EmptyProtocolSendAndReceiveTopResponse HLCPPToNaturalTraits<::test::emptystruct::EmptyProtocolSendAndReceiveTopResponse>::Convert(::test::emptystruct::EmptyProtocolSendAndReceiveTopResponse&& value) { |
| return ::test_emptystruct::EmptyProtocolSendAndReceiveTopResponse{{ |
| .e = ::fidl::HLCPPToNatural(std::move(value.e)), |
| }}; |
| } |
| ::test::emptystruct::EmptyProtocolSendAndReceiveRequest NaturalToHLCPPTraits<::test_emptystruct::EmptyProtocolSendAndReceiveRequest>::Convert(::test_emptystruct::EmptyProtocolSendAndReceiveRequest&& value) { |
| ::test::emptystruct::EmptyProtocolSendAndReceiveRequest hlcpp; |
| hlcpp.e = ::fidl::NaturalToHLCPP(std::move(value.e())); |
| return hlcpp; |
| } |
| |
| ::test_emptystruct::EmptyProtocolSendAndReceiveRequest HLCPPToNaturalTraits<::test::emptystruct::EmptyProtocolSendAndReceiveRequest>::Convert(::test::emptystruct::EmptyProtocolSendAndReceiveRequest&& value) { |
| return ::test_emptystruct::EmptyProtocolSendAndReceiveRequest{{ |
| .e = ::fidl::HLCPPToNatural(std::move(value.e)), |
| }}; |
| } |
| ::test::emptystruct::EmptyProtocolReceiveRequest NaturalToHLCPPTraits<::test_emptystruct::EmptyProtocolReceiveRequest>::Convert(::test_emptystruct::EmptyProtocolReceiveRequest&& value) { |
| ::test::emptystruct::EmptyProtocolReceiveRequest hlcpp; |
| hlcpp.e = ::fidl::NaturalToHLCPP(std::move(value.e())); |
| return hlcpp; |
| } |
| |
| ::test_emptystruct::EmptyProtocolReceiveRequest HLCPPToNaturalTraits<::test::emptystruct::EmptyProtocolReceiveRequest>::Convert(::test::emptystruct::EmptyProtocolReceiveRequest&& value) { |
| return ::test_emptystruct::EmptyProtocolReceiveRequest{{ |
| .e = ::fidl::HLCPPToNatural(std::move(value.e)), |
| }}; |
| } |
| |
| } // namespace internal |
| } // namespace fidl |