blob: 73aca74c0e654e031c3d9432e895947a948ff1c1 [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
#include <fidl/test.doccomments/cpp/common_types.h>
namespace test_doccomments {
extern "C" const fidl_type_t test_doccomments_MyStrictEnumTable;
} // namespace test_doccomments
size_t fidl::internal::DisplayError<::test_doccomments::MyStrictEnum>::Format(
const ::test_doccomments::MyStrictEnum& value, char* destination,
size_t capacity) {
const char* name = [&]() -> const char* {
switch (static_cast<uint32_t>(value)) {
case 1u:
return "FOO";
case 2u:
return "BAR";
default:
return nullptr;
}
}();
return ::fidl::internal::FormatApplicationError(
static_cast<uint32_t>(value), name,
&::test_doccomments::test_doccomments_MyStrictEnumTable, destination,
capacity);
}
namespace test_doccomments {
extern "C" const fidl_type_t test_doccomments_MyFlexibleEnumTable;
} // namespace test_doccomments
size_t fidl::internal::DisplayError<::test_doccomments::MyFlexibleEnum>::Format(
const ::test_doccomments::MyFlexibleEnum& value, char* destination,
size_t capacity) {
const char* name = [&]() -> const char* {
switch (static_cast<uint32_t>(value)) {
case 1u:
return "FOO";
case 2u:
return "BAR";
default:
return nullptr;
}
}();
return ::fidl::internal::FormatApplicationError(
static_cast<uint32_t>(value), name,
&::test_doccomments::test_doccomments_MyFlexibleEnumTable, destination,
capacity);
}