============== TableWithNamespace.fbs ============ include "${DIR}/tracing_schema_common.fbs"; namespace foo.bar; enum Color : int { Red = 0, Green = 1, Blue = 2 } table TestTable (tag: "TETB", span) { id: int; color: Color; } ============== diagnosis ============ ============== result ============ // Autogenerated by tracing_traits_generator, do not edit #ifndef THIRD_PARTY_FCP_TRACING_TOOLS_TESTDATA_TABLEWITHNAMESPACE_H #define THIRD_PARTY_FCP_TRACING_TOOLS_TESTDATA_TABLEWITHNAMESPACE_H #ifdef FLATBUFFERS_GENERATED_TRACINGSCHEMA_H_ #undef FLATBUFFERS_GENERATED_TRACINGSCHEMA_H_ #endif #include "${DIR}/tools/testdata/TableWithNamespace_generated.h" #include "absl/strings/string_view.h" #include "${DIR}/tracing_severity.h" #include "${DIR}/tracing_traits.h" #include "flatbuffers/minireflect.h" #include "flatbuffers/idl.h" #include "${BASE}/platform.h" namespace fcp { template<> class TracingTraits: public TracingTraitsBase { public: static constexpr TracingTag kTag = TracingTag("TETB"); static constexpr TracingSeverity kSeverity = fcp::TracingSeverity::kInfo; static constexpr bool kIsSpan = true; const char* Name() const override { return "foo::bar::TestTable"; } TracingSeverity Severity() const override { return fcp::TracingSeverity::kInfo; } std::string TextFormat(const flatbuffers::DetachedBuffer& buf) const override { return flatbuffers::FlatBufferToString(buf.data(), foo::bar::TestTableTypeTable()); } std::string JsonStringFormat(const uint8_t* flatbuf_bytes) const override { flatbuffers::Parser parser; std::string schema_file; std::string fbs_file = "${RUNFILE_PATH}/tools/testdata/TableWithNamespace.fbs"; flatbuffers::LoadFile(GetDataPath(fbs_file).c_str(), true, &schema_file); std::string schema_path_common = GetDataPath("${DIR}/tracing_schema_common.fbs"); std::string directory_common = schema_path_common.substr(0, schema_path_common.find("${DIR}/tracing_schema_common.fbs")); const char *include_directories[] = { directory_common.c_str(), nullptr}; parser.Parse(schema_file.c_str(), include_directories); std::string jsongen; parser.SetRootType("foo::bar::TestTable"); GenerateText(parser, flatbuf_bytes, &jsongen); return jsongen; } static flatbuffers::Offset Create(std::int32_t id, foo::bar::Color color, flatbuffers::FlatBufferBuilder* fbb) { return foo::bar::CreateTestTable(*fbb, id, color); } using TupleType = std::tuple; static TupleType MakeTuple(const foo::bar::TestTable* table) { return std::make_tuple(table->id(), table->color()); } }; static internal::TracingTraitsRegistrar registrar_TestTable; } // namespace fcp #endif // THIRD_PARTY_FCP_TRACING_TOOLS_TESTDATA_TABLEWITHNAMESPACE_H