| // WARNING: This file is machine generated by fidlgen. |
| |
| // fidl_experiment = output_index_json |
| |
| #pragma once |
| |
| #include <fidl/test.inheritance/cpp/natural_types.h> |
| #include <lib/fidl/cpp/hlcpp_conversion.h> |
| #include <lib/fidl/cpp/wire/service_handler.h> |
| #include <test/inheritance/cpp/fidl.h> |
| |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wshadow" |
| |
| namespace fidl { |
| namespace internal { |
| |
| template <> |
| struct NaturalToHLCPPTraits<fidl::ClientEnd<::test_inheritance::Super>> { |
| using HLCPPType = fidl::InterfaceHandle<::test::inheritance::super>; |
| static inline fidl::InterfaceHandle<::test::inheritance::super> Convert(fidl::ClientEnd<::test_inheritance::Super>&& c) { |
| return fidl::InterfaceHandle<::test::inheritance::super>(c.TakeChannel()); |
| } |
| }; |
| |
| template <> |
| struct NaturalToHLCPPTraits<fidl::ServerEnd<::test_inheritance::Super>> { |
| using HLCPPType = fidl::InterfaceRequest<::test::inheritance::super>; |
| static inline fidl::InterfaceRequest<::test::inheritance::super> Convert(fidl::ServerEnd<::test_inheritance::Super>&& c) { |
| return fidl::InterfaceRequest<::test::inheritance::super>(c.TakeChannel()); |
| } |
| }; |
| |
| template <> |
| struct HLCPPToNaturalTraits<fidl::InterfaceHandle<::test::inheritance::super>> { |
| using NaturalType = fidl::ClientEnd<::test_inheritance::Super>; |
| static inline fidl::ClientEnd<::test_inheritance::Super> Convert(fidl::InterfaceHandle<::test::inheritance::super>&& c) { |
| return fidl::ClientEnd<::test_inheritance::Super>(c.TakeChannel()); |
| } |
| }; |
| |
| template <> |
| struct HLCPPToNaturalTraits<fidl::InterfaceRequest<::test::inheritance::super>> { |
| using NaturalType = fidl::ServerEnd<::test_inheritance::Super>; |
| static inline fidl::ServerEnd<::test_inheritance::Super> Convert(fidl::InterfaceRequest<::test::inheritance::super>&& c) { |
| return fidl::ServerEnd<::test_inheritance::Super>(c.TakeChannel()); |
| } |
| }; |
| |
| template <> |
| struct NaturalToHLCPPTraits<fidl::ProtocolHandler<::test_inheritance::Super>> { |
| using HLCPPType = fidl::InterfaceRequestHandler<::test::inheritance::super>; |
| static inline fidl::InterfaceRequestHandler<::test::inheritance::super> Convert(fidl::ProtocolHandler<::test_inheritance::Super>&& c) { |
| return [c = std::move(c)](fidl::InterfaceRequest<::test::inheritance::super> r) { |
| c(::fidl::HLCPPToNatural(r)); |
| }; |
| } |
| }; |
| |
| template <> |
| struct HLCPPToNaturalTraits<fidl::InterfaceRequestHandler<::test::inheritance::super>> { |
| using NaturalType = fidl::ProtocolHandler<::test_inheritance::Super>; |
| static inline fidl::ProtocolHandler<::test_inheritance::Super> Convert(fidl::InterfaceRequestHandler<::test::inheritance::super>&& c) { |
| return [c = std::move(c)](fidl::ServerEnd<::test_inheritance::Super> r) { |
| c(::fidl::NaturalToHLCPP(r)); |
| }; |
| } |
| }; |
| template <> |
| struct NaturalToHLCPPTraits<fidl::ClientEnd<::test_inheritance::Sub>> { |
| using HLCPPType = fidl::InterfaceHandle<::test::inheritance::sub>; |
| static inline fidl::InterfaceHandle<::test::inheritance::sub> Convert(fidl::ClientEnd<::test_inheritance::Sub>&& c) { |
| return fidl::InterfaceHandle<::test::inheritance::sub>(c.TakeChannel()); |
| } |
| }; |
| |
| template <> |
| struct NaturalToHLCPPTraits<fidl::ServerEnd<::test_inheritance::Sub>> { |
| using HLCPPType = fidl::InterfaceRequest<::test::inheritance::sub>; |
| static inline fidl::InterfaceRequest<::test::inheritance::sub> Convert(fidl::ServerEnd<::test_inheritance::Sub>&& c) { |
| return fidl::InterfaceRequest<::test::inheritance::sub>(c.TakeChannel()); |
| } |
| }; |
| |
| template <> |
| struct HLCPPToNaturalTraits<fidl::InterfaceHandle<::test::inheritance::sub>> { |
| using NaturalType = fidl::ClientEnd<::test_inheritance::Sub>; |
| static inline fidl::ClientEnd<::test_inheritance::Sub> Convert(fidl::InterfaceHandle<::test::inheritance::sub>&& c) { |
| return fidl::ClientEnd<::test_inheritance::Sub>(c.TakeChannel()); |
| } |
| }; |
| |
| template <> |
| struct HLCPPToNaturalTraits<fidl::InterfaceRequest<::test::inheritance::sub>> { |
| using NaturalType = fidl::ServerEnd<::test_inheritance::Sub>; |
| static inline fidl::ServerEnd<::test_inheritance::Sub> Convert(fidl::InterfaceRequest<::test::inheritance::sub>&& c) { |
| return fidl::ServerEnd<::test_inheritance::Sub>(c.TakeChannel()); |
| } |
| }; |
| |
| template <> |
| struct NaturalToHLCPPTraits<fidl::ProtocolHandler<::test_inheritance::Sub>> { |
| using HLCPPType = fidl::InterfaceRequestHandler<::test::inheritance::sub>; |
| static inline fidl::InterfaceRequestHandler<::test::inheritance::sub> Convert(fidl::ProtocolHandler<::test_inheritance::Sub>&& c) { |
| return [c = std::move(c)](fidl::InterfaceRequest<::test::inheritance::sub> r) { |
| c(::fidl::HLCPPToNatural(r)); |
| }; |
| } |
| }; |
| |
| template <> |
| struct HLCPPToNaturalTraits<fidl::InterfaceRequestHandler<::test::inheritance::sub>> { |
| using NaturalType = fidl::ProtocolHandler<::test_inheritance::Sub>; |
| static inline fidl::ProtocolHandler<::test_inheritance::Sub> Convert(fidl::InterfaceRequestHandler<::test::inheritance::sub>&& c) { |
| return [c = std::move(c)](fidl::ServerEnd<::test_inheritance::Sub> r) { |
| c(::fidl::NaturalToHLCPP(r)); |
| }; |
| } |
| }; |
| |
| template <> |
| struct NaturalToHLCPPTraits<::test_inheritance::SuperFooRequest> { |
| using HLCPPType = ::test::inheritance::SuperFooRequest; |
| static inline ::test::inheritance::SuperFooRequest Convert(::test_inheritance::SuperFooRequest&&); |
| }; |
| template <> |
| struct HLCPPToNaturalTraits<::test::inheritance::SuperFooRequest> { |
| using NaturalType = ::test_inheritance::SuperFooRequest; |
| static inline ::test_inheritance::SuperFooRequest Convert(::test::inheritance::SuperFooRequest&&); |
| }; |
| template <> |
| struct NaturalToHLCPPTraits<::test_inheritance::SuperFooResponse> { |
| using HLCPPType = ::test::inheritance::SuperFooResponse; |
| static inline ::test::inheritance::SuperFooResponse Convert(::test_inheritance::SuperFooResponse&&); |
| }; |
| template <> |
| struct HLCPPToNaturalTraits<::test::inheritance::SuperFooResponse> { |
| using NaturalType = ::test_inheritance::SuperFooResponse; |
| static inline ::test_inheritance::SuperFooResponse Convert(::test::inheritance::SuperFooResponse&&); |
| }; |
| |
| ::test::inheritance::SuperFooRequest NaturalToHLCPPTraits<::test_inheritance::SuperFooRequest>::Convert(::test_inheritance::SuperFooRequest&& value) { |
| ::test::inheritance::SuperFooRequest hlcpp; |
| hlcpp.s = ::fidl::NaturalToHLCPP(std::move(value.s())); |
| return hlcpp; |
| } |
| |
| ::test_inheritance::SuperFooRequest HLCPPToNaturalTraits<::test::inheritance::SuperFooRequest>::Convert(::test::inheritance::SuperFooRequest&& value) { |
| return ::test_inheritance::SuperFooRequest{{ |
| .s = ::fidl::HLCPPToNatural(std::move(value.s)), |
| }}; |
| } |
| ::test::inheritance::SuperFooResponse NaturalToHLCPPTraits<::test_inheritance::SuperFooResponse>::Convert(::test_inheritance::SuperFooResponse&& value) { |
| ::test::inheritance::SuperFooResponse hlcpp; |
| hlcpp.y = ::fidl::NaturalToHLCPP(std::move(value.y())); |
| return hlcpp; |
| } |
| |
| ::test_inheritance::SuperFooResponse HLCPPToNaturalTraits<::test::inheritance::SuperFooResponse>::Convert(::test::inheritance::SuperFooResponse&& value) { |
| return ::test_inheritance::SuperFooResponse{{ |
| .y = ::fidl::HLCPPToNatural(std::move(value.y)), |
| }}; |
| } |
| |
| #pragma clang diagnostic pop |
| |
| } // namespace internal |
| } // namespace fidl |