| // WARNING: This file is machine generated by fidlgen. |
| |
| // fidl_experiment = output_index_json |
| |
| #include <fidl/test.nullable/cpp/natural_ostream.h> |
| |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wshadow" |
| |
| std::ostream& fidl::ostream::Formatter<::test_nullable::StructWithNullableString>::Format(std::ostream& os, const ::test_nullable::StructWithNullableString& value) { |
| os << "test_nullable::StructWithNullableString"; |
| os << "{ "; |
| os << "val"; |
| os << " = " << fidl::ostream::Formatted<::std::optional<::std::string>>(value.val()) << ", "; |
| os << "}"; |
| return os; |
| } |
| std::ostream& fidl::ostream::Formatter<::test_nullable::StructWithNullableVector>::Format(std::ostream& os, const ::test_nullable::StructWithNullableVector& value) { |
| os << "test_nullable::StructWithNullableVector"; |
| os << "{ "; |
| os << "val"; |
| os << " = " << fidl::ostream::Formatted<::std::optional<::std::vector<int32_t>>>(value.val()) << ", "; |
| os << "}"; |
| return os; |
| } |
| #ifdef __Fuchsia__ |
| |
| std::ostream& fidl::ostream::Formatter<::test_nullable::StructWithNullableHandle>::Format(std::ostream& os, const ::test_nullable::StructWithNullableHandle& value) { |
| os << "test_nullable::StructWithNullableHandle"; |
| os << "{ "; |
| os << "val"; |
| os << " = " << fidl::ostream::Formatted<::zx::vmo>(value.val()) << ", "; |
| os << "}"; |
| return os; |
| } |
| |
| #endif // __Fuchsia__ |
| |
| std::ostream& fidl::ostream::Formatter<::test_nullable::SimpleProtocolAddRequest>::Format(std::ostream& os, const ::test_nullable::SimpleProtocolAddRequest& value) { |
| os << "test_nullable::SimpleProtocolAddRequest"; |
| os << "{ "; |
| os << "a"; |
| os << " = " << fidl::ostream::Formatted<int32_t>(value.a()) << ", "; |
| os << "b"; |
| os << " = " << fidl::ostream::Formatted<int32_t>(value.b()) << ", "; |
| os << "}"; |
| return os; |
| } |
| std::ostream& fidl::ostream::Formatter<::test_nullable::SimpleProtocolAddResponse>::Format(std::ostream& os, const ::test_nullable::SimpleProtocolAddResponse& value) { |
| os << "test_nullable::SimpleProtocolAddResponse"; |
| os << "{ "; |
| os << "sum"; |
| os << " = " << fidl::ostream::Formatted<int32_t>(value.sum()) << ", "; |
| os << "}"; |
| return os; |
| } |
| #ifdef __Fuchsia__ |
| |
| std::ostream& fidl::ostream::Formatter<::test_nullable::StructWithNullableProtocol>::Format(std::ostream& os, const ::test_nullable::StructWithNullableProtocol& value) { |
| os << "test_nullable::StructWithNullableProtocol"; |
| os << "{ "; |
| os << "val"; |
| os << " = " << fidl::ostream::Formatted<::fidl::ClientEnd<::test_nullable::SimpleProtocol>>(value.val()) << ", "; |
| os << "}"; |
| return os; |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| std::ostream& fidl::ostream::Formatter<::test_nullable::StructWithNullableRequest>::Format(std::ostream& os, const ::test_nullable::StructWithNullableRequest& value) { |
| os << "test_nullable::StructWithNullableRequest"; |
| os << "{ "; |
| os << "val"; |
| os << " = " << fidl::ostream::Formatted<::fidl::ServerEnd<::test_nullable::SimpleProtocol>>(value.val()) << ", "; |
| os << "}"; |
| return os; |
| } |
| |
| #endif // __Fuchsia__ |
| |
| std::ostream& fidl::ostream::Formatter<::test_nullable::Int32Wrapper>::Format(std::ostream& os, const ::test_nullable::Int32Wrapper& value) { |
| os << "test_nullable::Int32Wrapper"; |
| os << "{ "; |
| os << "val"; |
| os << " = " << fidl::ostream::Formatted<int32_t>(value.val()) << ", "; |
| os << "}"; |
| return os; |
| } |
| std::ostream& fidl::ostream::Formatter<::test_nullable::StructWithNullableStruct>::Format(std::ostream& os, const ::test_nullable::StructWithNullableStruct& value) { |
| os << "test_nullable::StructWithNullableStruct"; |
| os << "{ "; |
| os << "val"; |
| os << " = " << fidl::ostream::Formatted<::fidl::Box<::test_nullable::Int32Wrapper>>(value.val()) << ", "; |
| os << "}"; |
| return os; |
| } |
| std::ostream& fidl::ostream::Formatter<::test_nullable::StructWithNullableUnion>::Format(std::ostream& os, const ::test_nullable::StructWithNullableUnion& value) { |
| os << "test_nullable::StructWithNullableUnion"; |
| os << "{ "; |
| os << "val"; |
| os << " = " << fidl::ostream::Formatted<::fidl::Box<::test_nullable::SimpleUnion>>(value.val()) << ", "; |
| os << "}"; |
| return os; |
| } |
| std::ostream& fidl::ostream::Formatter<::test_nullable::SimpleUnion>::Format(std::ostream& os, const ::test_nullable::SimpleUnion& value) { |
| os << "test_nullable::SimpleUnion::"; |
| switch (value.Which()) { |
| case ::test_nullable::SimpleUnion::Tag::kA: |
| os << "a(" << fidl::ostream::Formatted<int32_t>(value.a().value()) << ")"; |
| break; |
| case ::test_nullable::SimpleUnion::Tag::kB: |
| os << "b(" << fidl::ostream::Formatted<float>(value.b().value()) << ")"; |
| break; |
| default: |
| os << "Unknown"; |
| } |
| return os; |
| } |
| |
| namespace test_nullable { |
| |
| std::ostream& operator<<(std::ostream& os, const ::test_nullable::StructWithNullableString& value) { |
| return fidl::ostream::Formatter<::test_nullable::StructWithNullableString>::Format(os, value); |
| } |
| |
| std::ostream& operator<<(std::ostream& os, const ::test_nullable::StructWithNullableVector& value) { |
| return fidl::ostream::Formatter<::test_nullable::StructWithNullableVector>::Format(os, value); |
| } |
| |
| #ifdef __Fuchsia__ |
| |
| std::ostream& operator<<(std::ostream& os, const ::test_nullable::StructWithNullableHandle& value) { |
| return fidl::ostream::Formatter<::test_nullable::StructWithNullableHandle>::Format(os, value); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| std::ostream& operator<<(std::ostream& os, const ::test_nullable::SimpleProtocolAddRequest& value) { |
| return fidl::ostream::Formatter<::test_nullable::SimpleProtocolAddRequest>::Format(os, value); |
| } |
| |
| std::ostream& operator<<(std::ostream& os, const ::test_nullable::SimpleProtocolAddResponse& value) { |
| return fidl::ostream::Formatter<::test_nullable::SimpleProtocolAddResponse>::Format(os, value); |
| } |
| |
| #ifdef __Fuchsia__ |
| |
| std::ostream& operator<<(std::ostream& os, const ::test_nullable::StructWithNullableProtocol& value) { |
| return fidl::ostream::Formatter<::test_nullable::StructWithNullableProtocol>::Format(os, value); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| std::ostream& operator<<(std::ostream& os, const ::test_nullable::StructWithNullableRequest& value) { |
| return fidl::ostream::Formatter<::test_nullable::StructWithNullableRequest>::Format(os, value); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| std::ostream& operator<<(std::ostream& os, const ::test_nullable::Int32Wrapper& value) { |
| return fidl::ostream::Formatter<::test_nullable::Int32Wrapper>::Format(os, value); |
| } |
| |
| std::ostream& operator<<(std::ostream& os, const ::test_nullable::StructWithNullableStruct& value) { |
| return fidl::ostream::Formatter<::test_nullable::StructWithNullableStruct>::Format(os, value); |
| } |
| |
| std::ostream& operator<<(std::ostream& os, const ::test_nullable::SimpleUnion& value) { |
| return fidl::ostream::Formatter<::test_nullable::SimpleUnion>::Format(os, value); |
| } |
| |
| std::ostream& operator<<(std::ostream& os, const ::test_nullable::StructWithNullableUnion& value) { |
| return fidl::ostream::Formatter<::test_nullable::StructWithNullableUnion>::Format(os, value); |
| } |
| |
| #pragma clang diagnostic pop |
| |
| } // namespace test_nullable |