| // WARNING: This file is machine generated by fidlgen. |
| |
| // fidl_experiment = output_index_json |
| |
| #include <fidl/test.handlesintypes/cpp/natural_ostream.h> |
| |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wshadow" |
| |
| std::ostream& fidl::ostream::Formatter<::test_handlesintypes::ObjType>::Format(std::ostream& os, const ::test_handlesintypes::ObjType& value) { |
| os << "test_handlesintypes::ObjType"; |
| os << "::"; |
| switch (value) { |
| case ::test_handlesintypes::ObjType::kNone: |
| os << "kNone"; |
| break; |
| case ::test_handlesintypes::ObjType::kVmo: |
| os << "kVmo"; |
| break; |
| default: |
| os << "UNKNOWN(" << static_cast<uint32_t>(value) << ")"; |
| } |
| return os; |
| } |
| #ifdef __Fuchsia__ |
| |
| std::ostream& fidl::ostream::Formatter<::test_handlesintypes::HandlesInTypes>::Format(std::ostream& os, const ::test_handlesintypes::HandlesInTypes& value) { |
| os << "test_handlesintypes::HandlesInTypes"; |
| os << "{ "; |
| os << "normal_handle"; |
| os << " = " << fidl::ostream::Formatted<::zx::vmo>(value.normal_handle()) << ", "; |
| os << "handle_in_vec"; |
| os << " = " << fidl::ostream::Formatted<::std::vector<::zx::vmo>>(value.handle_in_vec()) << ", "; |
| os << "handle_in_array"; |
| os << " = " << fidl::ostream::Formatted<::std::array<::zx::vmo, 5>>(value.handle_in_array()) << ", "; |
| os << "handle_in_mixed_vec_array"; |
| os << " = " << fidl::ostream::Formatted<::std::vector<::std::array<::zx::vmo, 5>>>(value.handle_in_mixed_vec_array()) << ", "; |
| os << "table_with_handle"; |
| os << " = " << fidl::ostream::Formatted<::test_handlesintypes::TableWithHandle>(value.table_with_handle()) << ", "; |
| os << "union_with_handle"; |
| os << " = " << fidl::ostream::Formatted<::test_handlesintypes::UnionWithHandle>(value.union_with_handle()) << ", "; |
| os << "}"; |
| return os; |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| std::ostream& fidl::ostream::Formatter<::test_handlesintypes::EmptyResourceStruct>::Format(std::ostream& os, const ::test_handlesintypes::EmptyResourceStruct& value) { |
| os << "test_handlesintypes::EmptyResourceStruct"; |
| os << "{ "; |
| os << "__reserved"; |
| os << " = " << fidl::ostream::Formatted<uint8_t>(value.__reserved()) << ", "; |
| os << "}"; |
| return os; |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| std::ostream& fidl::ostream::Formatter<::test_handlesintypes::TableWithHandle>::Format(std::ostream& os, const ::test_handlesintypes::TableWithHandle& value) { |
| os << "test_handlesintypes::TableWithHandle"; |
| os << "{ "; |
| if (value.h().has_value()) { |
| os << "h"; |
| os << " = " << fidl::ostream::Formatted<::zx::vmo>(value.h().value()) << ", "; |
| } |
| os << "}"; |
| return os; |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| std::ostream& fidl::ostream::Formatter<::test_handlesintypes::EmptyResourceTable>::Format(std::ostream& os, const ::test_handlesintypes::EmptyResourceTable& value) { |
| os << "test_handlesintypes::EmptyResourceTable"; |
| os << "{ "; |
| os << "}"; |
| return os; |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| std::ostream& fidl::ostream::Formatter<::test_handlesintypes::UnionWithHandle>::Format(std::ostream& os, const ::test_handlesintypes::UnionWithHandle& value) { |
| os << "test_handlesintypes::UnionWithHandle::"; |
| switch (value.Which()) { |
| case ::test_handlesintypes::UnionWithHandle::Tag::kH: |
| os << "h(" << fidl::ostream::Formatted<::zx::vmo>(value.h().value()) << ")"; |
| break; |
| default: |
| os << "Unknown"; |
| } |
| return os; |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| std::ostream& fidl::ostream::Formatter<::test_handlesintypes::EmptyResourceUnion>::Format(std::ostream& os, const ::test_handlesintypes::EmptyResourceUnion& value) { |
| os << "test_handlesintypes::EmptyResourceUnion::"; |
| switch (value.Which()) { |
| default: |
| os << "Unknown"; |
| } |
| return os; |
| } |
| |
| #endif // __Fuchsia__ |
| |
| namespace test_handlesintypes { |
| |
| std::ostream& operator<<(std::ostream& os, const ::test_handlesintypes::ObjType& value) { |
| return fidl::ostream::Formatter<::test_handlesintypes::ObjType>::Format(os, value); |
| } |
| |
| #ifdef __Fuchsia__ |
| |
| std::ostream& operator<<(std::ostream& os, const ::test_handlesintypes::TableWithHandle& value) { |
| return fidl::ostream::Formatter<::test_handlesintypes::TableWithHandle>::Format(os, value); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| std::ostream& operator<<(std::ostream& os, const ::test_handlesintypes::UnionWithHandle& value) { |
| return fidl::ostream::Formatter<::test_handlesintypes::UnionWithHandle>::Format(os, value); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| std::ostream& operator<<(std::ostream& os, const ::test_handlesintypes::HandlesInTypes& value) { |
| return fidl::ostream::Formatter<::test_handlesintypes::HandlesInTypes>::Format(os, value); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| std::ostream& operator<<(std::ostream& os, const ::test_handlesintypes::EmptyResourceStruct& value) { |
| return fidl::ostream::Formatter<::test_handlesintypes::EmptyResourceStruct>::Format(os, value); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| std::ostream& operator<<(std::ostream& os, const ::test_handlesintypes::EmptyResourceTable& value) { |
| return fidl::ostream::Formatter<::test_handlesintypes::EmptyResourceTable>::Format(os, value); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #ifdef __Fuchsia__ |
| |
| std::ostream& operator<<(std::ostream& os, const ::test_handlesintypes::EmptyResourceUnion& value) { |
| return fidl::ostream::Formatter<::test_handlesintypes::EmptyResourceUnion>::Format(os, value); |
| } |
| |
| #endif // __Fuchsia__ |
| |
| #pragma clang diagnostic pop |
| |
| } // namespace test_handlesintypes |