blob: c6fa2ee90eb38676fcd824c6815c656fa400b71a [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
// fidl_experiment = output_index_json
#include <fidl/test.consts/cpp/natural_ostream.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
std::ostream& fidl::ostream::Formatter<::test_consts::EnumType>::Format(std::ostream& os, const ::test_consts::EnumType& value) {
os << "test_consts::EnumType";
os << "::";
switch (value) {
case ::test_consts::EnumType::kValue:
os << "kValue";
break;
case ::test_consts::EnumType::kTrue:
os << "kTrue";
break;
default:
os << "UNKNOWN(" << static_cast<int32_t>(value) << ")";
}
return os;
}
std::ostream& fidl::ostream::Formatter<::test_consts::BitsType>::Format(std::ostream& os, const ::test_consts::BitsType& value) {
os << "test_consts::BitsType";
os << "(";
bool first = true;
if (value & ::test_consts::BitsType::kValue) {
if (!first) os << "|";
first = false;
os << "kValue";
}
if (value & ::test_consts::BitsType::kTrue) {
if (!first) os << "|";
first = false;
os << "kTrue";
}
os << ")";
return os;
}
namespace test_consts {
std::ostream& operator<<(std::ostream& os, const ::test_consts::EnumType& value) {
return fidl::ostream::Formatter<::test_consts::EnumType>::Format(os, value);
}
std::ostream& operator<<(std::ostream& os, const ::test_consts::BitsType& value) {
return fidl::ostream::Formatter<::test_consts::BitsType>::Format(os, value);
}
#pragma clang diagnostic pop
} // namespace test_consts