| // WARNING: This file is machine generated by fidlgen. |
| |
| // fidl_experiment = output_index_json |
| |
| #include <fidl/test.protocols/cpp/natural_types.h> |
| |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wshadow" |
| |
| ::test_protocols::WithAndWithoutRequestResponseNoRequestWithResponseResponse::Storage_ test_protocols::WithAndWithoutRequestResponseNoRequestWithResponseResponse::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.ret)}; |
| } |
| |
| ::test_protocols::WithAndWithoutRequestResponseWithRequestNoResponseRequest::Storage_ test_protocols::WithAndWithoutRequestResponseWithRequestNoResponseRequest::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.arg)}; |
| } |
| |
| ::test_protocols::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest::Storage_ test_protocols::WithAndWithoutRequestResponseWithRequestEmptyResponseRequest::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.arg)}; |
| } |
| |
| ::test_protocols::WithAndWithoutRequestResponseWithRequestWithResponseRequest::Storage_ test_protocols::WithAndWithoutRequestResponseWithRequestWithResponseRequest::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.arg)}; |
| } |
| |
| ::test_protocols::WithAndWithoutRequestResponseWithRequestWithResponseResponse::Storage_ test_protocols::WithAndWithoutRequestResponseWithRequestWithResponseResponse::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.ret)}; |
| } |
| |
| ::test_protocols::WithAndWithoutRequestResponseOnWithResponseRequest::Storage_ test_protocols::WithAndWithoutRequestResponseOnWithResponseRequest::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.ret)}; |
| } |
| |
| ::test_protocols::WithErrorSyntaxResponseAsStructResponse::Storage_ test_protocols::WithErrorSyntaxResponseAsStructResponse::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.a), |
| ::fidl::internal::NaturalClone(storage_.b), |
| ::fidl::internal::NaturalClone(storage_.c)}; |
| } |
| |
| ::test_protocols::WithErrorSyntaxErrorAsPrimitiveResponse::Storage_ test_protocols::WithErrorSyntaxErrorAsPrimitiveResponse::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.__reserved)}; |
| } |
| |
| ::test_protocols::WithErrorSyntaxErrorAsEnumResponse::Storage_ test_protocols::WithErrorSyntaxErrorAsEnumResponse::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.__reserved)}; |
| } |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| ::test_protocols::ChannelProtocolMethodARequest::Storage_ test_protocols::ChannelProtocolMethodARequest::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.a), |
| ::fidl::internal::NaturalClone(storage_.b)}; |
| } |
| |
| ::test_protocols::ChannelProtocolEventARequest::Storage_ test_protocols::ChannelProtocolEventARequest::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.a), |
| ::fidl::internal::NaturalClone(storage_.b)}; |
| } |
| |
| ::test_protocols::ChannelProtocolMethodBRequest::Storage_ test_protocols::ChannelProtocolMethodBRequest::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.a), |
| ::fidl::internal::NaturalClone(storage_.b)}; |
| } |
| |
| ::test_protocols::ChannelProtocolMethodBResponse::Storage_ test_protocols::ChannelProtocolMethodBResponse::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.result)}; |
| } |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| ::test_protocols::SyscallProtocolMethodCRequest::Storage_ test_protocols::SyscallProtocolMethodCRequest::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.a), |
| ::fidl::internal::NaturalClone(storage_.b)}; |
| } |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| ::test_protocols::ManyParametersFifteenRequest::Storage_ test_protocols::ManyParametersFifteenRequest::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.p1), |
| ::fidl::internal::NaturalClone(storage_.p2), |
| ::fidl::internal::NaturalClone(storage_.p3), |
| ::fidl::internal::NaturalClone(storage_.p4), |
| ::fidl::internal::NaturalClone(storage_.p5), |
| ::fidl::internal::NaturalClone(storage_.p6), |
| ::fidl::internal::NaturalClone(storage_.p7), |
| ::fidl::internal::NaturalClone(storage_.p8), |
| ::fidl::internal::NaturalClone(storage_.p9), |
| ::fidl::internal::NaturalClone(storage_.p10), |
| ::fidl::internal::NaturalClone(storage_.p11), |
| ::fidl::internal::NaturalClone(storage_.p12), |
| ::fidl::internal::NaturalClone(storage_.p13), |
| ::fidl::internal::NaturalClone(storage_.p14), |
| ::fidl::internal::NaturalClone(storage_.p15)}; |
| } |
| |
| ::test_protocols::MethodWithUnionUnionMethodRequest::Storage_ test_protocols::MethodWithUnionUnionMethodRequest::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.u)}; |
| } |
| |
| ::test_protocols::MethodWithUnionUnionMethodResponse::Storage_ test_protocols::MethodWithUnionUnionMethodResponse::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.u)}; |
| } |
| |
| std::shared_ptr<::test_protocols::WithErrorSyntaxResponseAsStructResult::Storage_> test_protocols::WithErrorSyntaxResponseAsStructResult::CloneStorage_() const { |
| const Storage_& storage = *storage_; |
| switch (storage_->index()) { |
| case 1: |
| return std::make_shared<Storage_>( |
| std::in_place_index<1>, |
| ::fidl::internal::NaturalClone(std::get<1>(storage))); |
| case 2: |
| return std::make_shared<Storage_>( |
| std::in_place_index<2>, |
| ::fidl::internal::NaturalClone(std::get<2>(storage))); |
| default: |
| return std::make_shared<Storage_>(); |
| } |
| } |
| |
| std::shared_ptr<::test_protocols::WithErrorSyntaxErrorAsPrimitiveResult::Storage_> test_protocols::WithErrorSyntaxErrorAsPrimitiveResult::CloneStorage_() const { |
| const Storage_& storage = *storage_; |
| switch (storage_->index()) { |
| case 1: |
| return std::make_shared<Storage_>( |
| std::in_place_index<1>, |
| ::fidl::internal::NaturalClone(std::get<1>(storage))); |
| case 2: |
| return std::make_shared<Storage_>( |
| std::in_place_index<2>, |
| ::fidl::internal::NaturalClone(std::get<2>(storage))); |
| default: |
| return std::make_shared<Storage_>(); |
| } |
| } |
| |
| std::shared_ptr<::test_protocols::WithErrorSyntaxErrorAsEnumResult::Storage_> test_protocols::WithErrorSyntaxErrorAsEnumResult::CloneStorage_() const { |
| const Storage_& storage = *storage_; |
| switch (storage_->index()) { |
| case 1: |
| return std::make_shared<Storage_>( |
| std::in_place_index<1>, |
| ::fidl::internal::NaturalClone(std::get<1>(storage))); |
| case 2: |
| return std::make_shared<Storage_>( |
| std::in_place_index<2>, |
| ::fidl::internal::NaturalClone(std::get<2>(storage))); |
| default: |
| return std::make_shared<Storage_>(); |
| } |
| } |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| std::shared_ptr<::test_protocols::TheUnion::Storage_> test_protocols::TheUnion::CloneStorage_() const { |
| const Storage_& storage = *storage_; |
| switch (storage_->index()) { |
| case 1: |
| return std::make_shared<Storage_>( |
| std::in_place_index<1>, |
| ::fidl::internal::NaturalClone(std::get<1>(storage))); |
| default: |
| return std::make_shared<Storage_>(); |
| } |
| } |
| |
| #pragma clang diagnostic pop |