// // automatically generated by the FlatBuffers compiler, do not modify // namespace SCHALE.Common.FlatData { using global::System; using global::System.Collections.Generic; using global::SCHALE.Common.Crypto; using global::Google.FlatBuffers; public struct InformationExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static InformationExcel GetRootAsInformationExcel(ByteBuffer _bb) { return GetRootAsInformationExcel(_bb, new InformationExcel()); } public static InformationExcel GetRootAsInformationExcel(ByteBuffer _bb, InformationExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public InformationExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public long GroupID { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public string PageName { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetPageNameBytes() { return __p.__vector_as_span(6, 1); } #else public ArraySegment? GetPageNameBytes() { return __p.__vector_as_arraysegment(6); } #endif public byte[] GetPageNameArray() { return __p.__vector_as_array(6); } public string LocalizeCodeId { get { int o = __p.__offset(8); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetLocalizeCodeIdBytes() { return __p.__vector_as_span(8, 1); } #else public ArraySegment? GetLocalizeCodeIdBytes() { return __p.__vector_as_arraysegment(8); } #endif public byte[] GetLocalizeCodeIdArray() { return __p.__vector_as_array(8); } public string TutorialParentName(int j) { int o = __p.__offset(10); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } public int TutorialParentNameLength { get { int o = __p.__offset(10); return o != 0 ? __p.__vector_len(o) : 0; } } public string UIName(int j) { int o = __p.__offset(12); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } public int UINameLength { get { int o = __p.__offset(12); return o != 0 ? __p.__vector_len(o) : 0; } } public static Offset CreateInformationExcel(FlatBufferBuilder builder, long GroupID = 0, StringOffset PageNameOffset = default(StringOffset), StringOffset LocalizeCodeIdOffset = default(StringOffset), VectorOffset TutorialParentNameOffset = default(VectorOffset), VectorOffset UINameOffset = default(VectorOffset)) { builder.StartTable(5); InformationExcel.AddGroupID(builder, GroupID); InformationExcel.AddUIName(builder, UINameOffset); InformationExcel.AddTutorialParentName(builder, TutorialParentNameOffset); InformationExcel.AddLocalizeCodeId(builder, LocalizeCodeIdOffset); InformationExcel.AddPageName(builder, PageNameOffset); return InformationExcel.EndInformationExcel(builder); } public static void StartInformationExcel(FlatBufferBuilder builder) { builder.StartTable(5); } public static void AddGroupID(FlatBufferBuilder builder, long groupID) { builder.AddLong(0, groupID, 0); } public static void AddPageName(FlatBufferBuilder builder, StringOffset pageNameOffset) { builder.AddOffset(1, pageNameOffset.Value, 0); } public static void AddLocalizeCodeId(FlatBufferBuilder builder, StringOffset localizeCodeIdOffset) { builder.AddOffset(2, localizeCodeIdOffset.Value, 0); } public static void AddTutorialParentName(FlatBufferBuilder builder, VectorOffset tutorialParentNameOffset) { builder.AddOffset(3, 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 void AddUIName(FlatBufferBuilder builder, VectorOffset uINameOffset) { builder.AddOffset(4, 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 Offset EndInformationExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public InformationExcelT UnPack() { var _o = new InformationExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(InformationExcelT _o) { byte[] key = TableEncryptionService.CreateKey("Information"); _o.GroupID = TableEncryptionService.Convert(this.GroupID, key); _o.PageName = TableEncryptionService.Convert(this.PageName, key); _o.LocalizeCodeId = TableEncryptionService.Convert(this.LocalizeCodeId, key); _o.TutorialParentName = new List(); for (var _j = 0; _j < this.TutorialParentNameLength; ++_j) {_o.TutorialParentName.Add(TableEncryptionService.Convert(this.TutorialParentName(_j), key));} _o.UIName = new List(); for (var _j = 0; _j < this.UINameLength; ++_j) {_o.UIName.Add(TableEncryptionService.Convert(this.UIName(_j), key));} } public static Offset Pack(FlatBufferBuilder builder, InformationExcelT _o) { if (_o == null) return default(Offset); var _PageName = _o.PageName == null ? default(StringOffset) : builder.CreateString(_o.PageName); var _LocalizeCodeId = _o.LocalizeCodeId == null ? default(StringOffset) : builder.CreateString(_o.LocalizeCodeId); var _TutorialParentName = default(VectorOffset); if (_o.TutorialParentName != null) { var __TutorialParentName = new StringOffset[_o.TutorialParentName.Count]; for (var _j = 0; _j < __TutorialParentName.Length; ++_j) { __TutorialParentName[_j] = builder.CreateString(_o.TutorialParentName[_j]); } _TutorialParentName = CreateTutorialParentNameVector(builder, __TutorialParentName); } var _UIName = default(VectorOffset); if (_o.UIName != null) { var __UIName = new StringOffset[_o.UIName.Count]; for (var _j = 0; _j < __UIName.Length; ++_j) { __UIName[_j] = builder.CreateString(_o.UIName[_j]); } _UIName = CreateUINameVector(builder, __UIName); } return CreateInformationExcel( builder, _o.GroupID, _PageName, _LocalizeCodeId, _TutorialParentName, _UIName); } } public class InformationExcelT { public long GroupID { get; set; } public string PageName { get; set; } public string LocalizeCodeId { get; set; } public List TutorialParentName { get; set; } public List UIName { get; set; } public InformationExcelT() { this.GroupID = 0; this.PageName = null; this.LocalizeCodeId = null; this.TutorialParentName = null; this.UIName = null; } } static public class InformationExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*GroupID*/, 8 /*long*/, 8, false) && verifier.VerifyString(tablePos, 6 /*PageName*/, false) && verifier.VerifyString(tablePos, 8 /*LocalizeCodeId*/, false) && verifier.VerifyVectorOfStrings(tablePos, 10 /*TutorialParentName*/, false) && verifier.VerifyVectorOfStrings(tablePos, 12 /*UIName*/, false) && verifier.VerifyTableEnd(tablePos); } } }