============== OrderWithIds.fbs ============ include "${DIR}/tracing_schema_common.fbs"; table OrderWithIds (tag: "ORDI") { fieldz: int (id: 1); fieldy: int (id: 2); fieldx: int (id: 0); } ============== diagnosis ============ ============== result ============ // Autogenerated by tracing_traits_generator, do not edit #ifndef THIRD_PARTY_FCP_TRACING_TOOLS_TESTDATA_ORDERWITHIDS_H #define THIRD_PARTY_FCP_TRACING_TOOLS_TESTDATA_ORDERWITHIDS_H #ifdef FLATBUFFERS_GENERATED_TRACINGSCHEMA_H_ #undef FLATBUFFERS_GENERATED_TRACINGSCHEMA_H_ #endif #include "${DIR}/tools/testdata/OrderWithIds_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("ORDI"); static constexpr TracingSeverity kSeverity = fcp::TracingSeverity::kInfo; static constexpr bool kIsSpan = false; const char* Name() const override { return "OrderWithIds"; } TracingSeverity Severity() const override { return fcp::TracingSeverity::kInfo; } std::string TextFormat(const flatbuffers::DetachedBuffer& buf) const override { return flatbuffers::FlatBufferToString(buf.data(), OrderWithIdsTypeTable()); } 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/OrderWithIds.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("OrderWithIds"); GenerateText(parser, flatbuf_bytes, &jsongen); return jsongen; } static flatbuffers::Offset Create(std::int32_t fieldx, std::int32_t fieldz, std::int32_t fieldy, flatbuffers::FlatBufferBuilder* fbb) { return CreateOrderWithIds(*fbb, fieldx, fieldz, fieldy); } using TupleType = std::tuple; static TupleType MakeTuple(const OrderWithIds* table) { return std::make_tuple(table->fieldx(), table->fieldz(), table->fieldy()); } }; static internal::TracingTraitsRegistrar registrar_OrderWithIds; } // namespace fcp #endif // THIRD_PARTY_FCP_TRACING_TOOLS_TESTDATA_ORDERWITHIDS_H