blob: 78b688fcd6080e4463af19143df1c623f6bfd597 [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
// fidl_experiment = output_index_json
#include <fidl/test.protocollayouts/cpp/natural_types.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
::test_protocollayouts::LocalTablePayload::Storage_ test_protocollayouts::LocalTablePayload::CloneStorage_() const {
return Storage_{
::fidl::internal::NaturalClone(storage_.a)};
}
::test_protocollayouts::MainProtocolOneWayAnonRequest::Storage_ test_protocollayouts::MainProtocolOneWayAnonRequest::CloneStorage_() const {
return Storage_{
::fidl::internal::NaturalClone(storage_.a)};
}
::test_protocollayouts::MainProtocolTwoWayAnonResponse::Storage_ test_protocollayouts::MainProtocolTwoWayAnonResponse::CloneStorage_() const {
return Storage_{
::fidl::internal::NaturalClone(storage_.a)};
}
::test_protocollayouts::MainProtocolTwoWayAnonWithErrorRequest::Storage_ test_protocollayouts::MainProtocolTwoWayAnonWithErrorRequest::CloneStorage_() const {
return Storage_{
::fidl::internal::NaturalClone(storage_.a)};
}
std::shared_ptr<::test_protocollayouts::LocalUnionPayload::Storage_> test_protocollayouts::LocalUnionPayload::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_>();
}
}
std::shared_ptr<::test_protocollayouts::MainProtocolTwoWayImportWithErrorResult::Storage_> test_protocollayouts::MainProtocolTwoWayImportWithErrorResult::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_protocollayouts::MainProtocolTwoWayLocalWithErrorResult::Storage_> test_protocollayouts::MainProtocolTwoWayLocalWithErrorResult::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_protocollayouts::MainProtocolTwoWayAnonRequest::Storage_> test_protocollayouts::MainProtocolTwoWayAnonRequest::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_>();
}
}
std::shared_ptr<::test_protocollayouts::MainProtocolTwoWayAnonWithErrorResponse::Storage_> test_protocollayouts::MainProtocolTwoWayAnonWithErrorResponse::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_>();
}
}
std::shared_ptr<::test_protocollayouts::MainProtocolTwoWayAnonWithErrorResult::Storage_> test_protocollayouts::MainProtocolTwoWayAnonWithErrorResult::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_protocollayouts::MainProtocolOnAnonRequest::Storage_> test_protocollayouts::MainProtocolOnAnonRequest::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