| // WARNING: This file is machine generated by fidlgen. |
| |
| // fidl_experiment = output_index_json |
| |
| #include <fidl/test.nullable/cpp/natural_types.h> |
| |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wshadow" |
| |
| ::test_nullable::StructWithNullableString::Storage_ test_nullable::StructWithNullableString::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.val)}; |
| } |
| |
| ::test_nullable::StructWithNullableVector::Storage_ test_nullable::StructWithNullableVector::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.val)}; |
| } |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| ::test_nullable::SimpleProtocolAddRequest::Storage_ test_nullable::SimpleProtocolAddRequest::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.a), |
| ::fidl::internal::NaturalClone(storage_.b)}; |
| } |
| |
| ::test_nullable::SimpleProtocolAddResponse::Storage_ test_nullable::SimpleProtocolAddResponse::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.sum)}; |
| } |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| #endif // __Fuchsia__ |
| |
| ::test_nullable::Int32Wrapper::Storage_ test_nullable::Int32Wrapper::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.val)}; |
| } |
| |
| ::test_nullable::StructWithNullableStruct::Storage_ test_nullable::StructWithNullableStruct::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.val)}; |
| } |
| |
| ::test_nullable::StructWithNullableUnion::Storage_ test_nullable::StructWithNullableUnion::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.val)}; |
| } |
| |
| std::shared_ptr<::test_nullable::SimpleUnion::Storage_> test_nullable::SimpleUnion::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_>(); |
| } |
| } |
| |
| #pragma clang diagnostic pop |