// // automatically generated by the FlatBuffers compiler, do not modify // namespace SCHALE.Common.FlatData { using global::System; using global::System.Collections.Generic; using global::Google.FlatBuffers; public struct TutorialExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static TutorialExcel GetRootAsTutorialExcel(ByteBuffer _bb) { return GetRootAsTutorialExcel(_bb, new TutorialExcel()); } public static TutorialExcel GetRootAsTutorialExcel(ByteBuffer _bb, TutorialExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public TutorialExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public long ID { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public string CompletionReportEventName { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetCompletionReportEventNameBytes() { return __p.__vector_as_span(6, 1); } #else public ArraySegment? GetCompletionReportEventNameBytes() { return __p.__vector_as_arraysegment(6); } #endif public byte[] GetCompletionReportEventNameArray() { return __p.__vector_as_array(6); } public bool CompulsoryTutorial { get { int o = __p.__offset(8); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public bool DescriptionTutorial { get { int o = __p.__offset(10); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public long TutorialStageId { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public string UIName(int j) { int o = __p.__offset(14); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } public int UINameLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } } public string TutorialParentName(int j) { int o = __p.__offset(16); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } public int TutorialParentNameLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } } public static Offset CreateTutorialExcel(FlatBufferBuilder builder, long ID = 0, StringOffset CompletionReportEventNameOffset = default(StringOffset), bool CompulsoryTutorial = false, bool DescriptionTutorial = false, long TutorialStageId = 0, VectorOffset UINameOffset = default(VectorOffset), VectorOffset TutorialParentNameOffset = default(VectorOffset)) { builder.StartTable(7); TutorialExcel.AddTutorialStageId(builder, TutorialStageId); TutorialExcel.AddID(builder, ID); TutorialExcel.AddTutorialParentName(builder, TutorialParentNameOffset); TutorialExcel.AddUIName(builder, UINameOffset); TutorialExcel.AddCompletionReportEventName(builder, CompletionReportEventNameOffset); TutorialExcel.AddDescriptionTutorial(builder, DescriptionTutorial); TutorialExcel.AddCompulsoryTutorial(builder, CompulsoryTutorial); return TutorialExcel.EndTutorialExcel(builder); } public static void StartTutorialExcel(FlatBufferBuilder builder) { builder.StartTable(7); } public static void AddID(FlatBufferBuilder builder, long iD) { builder.AddLong(0, iD, 0); } public static void AddCompletionReportEventName(FlatBufferBuilder builder, StringOffset completionReportEventNameOffset) { builder.AddOffset(1, completionReportEventNameOffset.Value, 0); } public static void AddCompulsoryTutorial(FlatBufferBuilder builder, bool compulsoryTutorial) { builder.AddBool(2, compulsoryTutorial, false); } public static void AddDescriptionTutorial(FlatBufferBuilder builder, bool descriptionTutorial) { builder.AddBool(3, descriptionTutorial, false); } public static void AddTutorialStageId(FlatBufferBuilder builder, long tutorialStageId) { builder.AddLong(4, tutorialStageId, 0); } public static void AddUIName(FlatBufferBuilder builder, VectorOffset uINameOffset) { builder.AddOffset(5, uINameOffset.Value, 0); } public static VectorOffset CreateUINameVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } public static VectorOffset CreateUINameVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateUINameVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateUINameVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartUINameVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddTutorialParentName(FlatBufferBuilder builder, VectorOffset tutorialParentNameOffset) { builder.AddOffset(6, tutorialParentNameOffset.Value, 0); } public static VectorOffset CreateTutorialParentNameVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } public static VectorOffset CreateTutorialParentNameVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateTutorialParentNameVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateTutorialParentNameVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartTutorialParentNameVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static Offset EndTutorialExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } } static public class TutorialExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*ID*/, 8 /*long*/, 8, false) && verifier.VerifyString(tablePos, 6 /*CompletionReportEventName*/, false) && verifier.VerifyField(tablePos, 8 /*CompulsoryTutorial*/, 1 /*bool*/, 1, false) && verifier.VerifyField(tablePos, 10 /*DescriptionTutorial*/, 1 /*bool*/, 1, false) && verifier.VerifyField(tablePos, 12 /*TutorialStageId*/, 8 /*long*/, 8, false) && verifier.VerifyVectorOfStrings(tablePos, 14 /*UIName*/, false) && verifier.VerifyVectorOfStrings(tablePos, 16 /*TutorialParentName*/, false) && verifier.VerifyTableEnd(tablePos); } } }