// // 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 BGMExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static BGMExcel GetRootAsBGMExcel(ByteBuffer _bb) { return GetRootAsBGMExcel(_bb, new BGMExcel()); } public static BGMExcel GetRootAsBGMExcel(ByteBuffer _bb, BGMExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public BGMExcel __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 SCHALE.Common.FlatData.Nation Nation_(int j) { int o = __p.__offset(6); return o != 0 ? (SCHALE.Common.FlatData.Nation)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.Nation)0; } public int Nation_Length { get { int o = __p.__offset(6); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetNation_Bytes() { return __p.__vector_as_span(6, 4); } #else public ArraySegment? GetNation_Bytes() { return __p.__vector_as_arraysegment(6); } #endif public SCHALE.Common.FlatData.Nation[] GetNation_Array() { int o = __p.__offset(6); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.Nation[] a = new SCHALE.Common.FlatData.Nation[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.Nation)__p.bb.GetInt(p + i * 4); } return a; } public string Path(int j) { int o = __p.__offset(8); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } public int PathLength { get { int o = __p.__offset(8); return o != 0 ? __p.__vector_len(o) : 0; } } public float Volume(int j) { int o = __p.__offset(10); return o != 0 ? __p.bb.GetFloat(__p.__vector(o) + j * 4) : (float)0; } public int VolumeLength { get { int o = __p.__offset(10); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetVolumeBytes() { return __p.__vector_as_span(10, 4); } #else public ArraySegment? GetVolumeBytes() { return __p.__vector_as_arraysegment(10); } #endif public float[] GetVolumeArray() { return __p.__vector_as_array(10); } public float LoopStartTime(int j) { int o = __p.__offset(12); return o != 0 ? __p.bb.GetFloat(__p.__vector(o) + j * 4) : (float)0; } public int LoopStartTimeLength { get { int o = __p.__offset(12); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetLoopStartTimeBytes() { return __p.__vector_as_span(12, 4); } #else public ArraySegment? GetLoopStartTimeBytes() { return __p.__vector_as_arraysegment(12); } #endif public float[] GetLoopStartTimeArray() { return __p.__vector_as_array(12); } public float LoopEndTime(int j) { int o = __p.__offset(14); return o != 0 ? __p.bb.GetFloat(__p.__vector(o) + j * 4) : (float)0; } public int LoopEndTimeLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetLoopEndTimeBytes() { return __p.__vector_as_span(14, 4); } #else public ArraySegment? GetLoopEndTimeBytes() { return __p.__vector_as_arraysegment(14); } #endif public float[] GetLoopEndTimeArray() { return __p.__vector_as_array(14); } public float LoopTranstionTime(int j) { int o = __p.__offset(16); return o != 0 ? __p.bb.GetFloat(__p.__vector(o) + j * 4) : (float)0; } public int LoopTranstionTimeLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetLoopTranstionTimeBytes() { return __p.__vector_as_span(16, 4); } #else public ArraySegment? GetLoopTranstionTimeBytes() { return __p.__vector_as_arraysegment(16); } #endif public float[] GetLoopTranstionTimeArray() { return __p.__vector_as_array(16); } public float LoopOffsetTime(int j) { int o = __p.__offset(18); return o != 0 ? __p.bb.GetFloat(__p.__vector(o) + j * 4) : (float)0; } public int LoopOffsetTimeLength { get { int o = __p.__offset(18); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetLoopOffsetTimeBytes() { return __p.__vector_as_span(18, 4); } #else public ArraySegment? GetLoopOffsetTimeBytes() { return __p.__vector_as_arraysegment(18); } #endif public float[] GetLoopOffsetTimeArray() { return __p.__vector_as_array(18); } public static Offset CreateBGMExcel(FlatBufferBuilder builder, long Id = 0, VectorOffset Nation_Offset = default(VectorOffset), VectorOffset PathOffset = default(VectorOffset), VectorOffset VolumeOffset = default(VectorOffset), VectorOffset LoopStartTimeOffset = default(VectorOffset), VectorOffset LoopEndTimeOffset = default(VectorOffset), VectorOffset LoopTranstionTimeOffset = default(VectorOffset), VectorOffset LoopOffsetTimeOffset = default(VectorOffset)) { builder.StartTable(8); BGMExcel.AddId(builder, Id); BGMExcel.AddLoopOffsetTime(builder, LoopOffsetTimeOffset); BGMExcel.AddLoopTranstionTime(builder, LoopTranstionTimeOffset); BGMExcel.AddLoopEndTime(builder, LoopEndTimeOffset); BGMExcel.AddLoopStartTime(builder, LoopStartTimeOffset); BGMExcel.AddVolume(builder, VolumeOffset); BGMExcel.AddPath(builder, PathOffset); BGMExcel.AddNation_(builder, Nation_Offset); return BGMExcel.EndBGMExcel(builder); } public static void StartBGMExcel(FlatBufferBuilder builder) { builder.StartTable(8); } public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); } public static void AddNation_(FlatBufferBuilder builder, VectorOffset nation_Offset) { builder.AddOffset(1, nation_Offset.Value, 0); } public static VectorOffset CreateNation_Vector(FlatBufferBuilder builder, SCHALE.Common.FlatData.Nation[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddInt((int)data[i]); return builder.EndVector(); } public static VectorOffset CreateNation_VectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.Nation[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateNation_VectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateNation_VectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartNation_Vector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddPath(FlatBufferBuilder builder, VectorOffset pathOffset) { builder.AddOffset(2, pathOffset.Value, 0); } public static VectorOffset CreatePathVector(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 CreatePathVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreatePathVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreatePathVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartPathVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddVolume(FlatBufferBuilder builder, VectorOffset volumeOffset) { builder.AddOffset(3, volumeOffset.Value, 0); } public static VectorOffset CreateVolumeVector(FlatBufferBuilder builder, float[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddFloat(data[i]); return builder.EndVector(); } public static VectorOffset CreateVolumeVectorBlock(FlatBufferBuilder builder, float[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateVolumeVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateVolumeVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartVolumeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddLoopStartTime(FlatBufferBuilder builder, VectorOffset loopStartTimeOffset) { builder.AddOffset(4, loopStartTimeOffset.Value, 0); } public static VectorOffset CreateLoopStartTimeVector(FlatBufferBuilder builder, float[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddFloat(data[i]); return builder.EndVector(); } public static VectorOffset CreateLoopStartTimeVectorBlock(FlatBufferBuilder builder, float[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateLoopStartTimeVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateLoopStartTimeVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartLoopStartTimeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddLoopEndTime(FlatBufferBuilder builder, VectorOffset loopEndTimeOffset) { builder.AddOffset(5, loopEndTimeOffset.Value, 0); } public static VectorOffset CreateLoopEndTimeVector(FlatBufferBuilder builder, float[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddFloat(data[i]); return builder.EndVector(); } public static VectorOffset CreateLoopEndTimeVectorBlock(FlatBufferBuilder builder, float[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateLoopEndTimeVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateLoopEndTimeVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartLoopEndTimeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddLoopTranstionTime(FlatBufferBuilder builder, VectorOffset loopTranstionTimeOffset) { builder.AddOffset(6, loopTranstionTimeOffset.Value, 0); } public static VectorOffset CreateLoopTranstionTimeVector(FlatBufferBuilder builder, float[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddFloat(data[i]); return builder.EndVector(); } public static VectorOffset CreateLoopTranstionTimeVectorBlock(FlatBufferBuilder builder, float[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateLoopTranstionTimeVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateLoopTranstionTimeVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartLoopTranstionTimeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddLoopOffsetTime(FlatBufferBuilder builder, VectorOffset loopOffsetTimeOffset) { builder.AddOffset(7, loopOffsetTimeOffset.Value, 0); } public static VectorOffset CreateLoopOffsetTimeVector(FlatBufferBuilder builder, float[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddFloat(data[i]); return builder.EndVector(); } public static VectorOffset CreateLoopOffsetTimeVectorBlock(FlatBufferBuilder builder, float[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateLoopOffsetTimeVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateLoopOffsetTimeVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartLoopOffsetTimeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static Offset EndBGMExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public BGMExcelT UnPack() { var _o = new BGMExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(BGMExcelT _o) { byte[] key = TableEncryptionService.CreateKey("BGM"); _o.Id = TableEncryptionService.Convert(this.Id, key); _o.Nation_ = new List(); for (var _j = 0; _j < this.Nation_Length; ++_j) {_o.Nation_.Add(TableEncryptionService.Convert(this.Nation_(_j), key));} _o.Path = new List(); for (var _j = 0; _j < this.PathLength; ++_j) {_o.Path.Add(TableEncryptionService.Convert(this.Path(_j), key));} _o.Volume = new List(); for (var _j = 0; _j < this.VolumeLength; ++_j) {_o.Volume.Add(TableEncryptionService.Convert(this.Volume(_j), key));} _o.LoopStartTime = new List(); for (var _j = 0; _j < this.LoopStartTimeLength; ++_j) {_o.LoopStartTime.Add(TableEncryptionService.Convert(this.LoopStartTime(_j), key));} _o.LoopEndTime = new List(); for (var _j = 0; _j < this.LoopEndTimeLength; ++_j) {_o.LoopEndTime.Add(TableEncryptionService.Convert(this.LoopEndTime(_j), key));} _o.LoopTranstionTime = new List(); for (var _j = 0; _j < this.LoopTranstionTimeLength; ++_j) {_o.LoopTranstionTime.Add(TableEncryptionService.Convert(this.LoopTranstionTime(_j), key));} _o.LoopOffsetTime = new List(); for (var _j = 0; _j < this.LoopOffsetTimeLength; ++_j) {_o.LoopOffsetTime.Add(TableEncryptionService.Convert(this.LoopOffsetTime(_j), key));} } public static Offset Pack(FlatBufferBuilder builder, BGMExcelT _o) { if (_o == null) return default(Offset); var _Nation_ = default(VectorOffset); if (_o.Nation_ != null) { var __Nation_ = _o.Nation_.ToArray(); _Nation_ = CreateNation_Vector(builder, __Nation_); } var _Path = default(VectorOffset); if (_o.Path != null) { var __Path = new StringOffset[_o.Path.Count]; for (var _j = 0; _j < __Path.Length; ++_j) { __Path[_j] = builder.CreateString(_o.Path[_j]); } _Path = CreatePathVector(builder, __Path); } var _Volume = default(VectorOffset); if (_o.Volume != null) { var __Volume = _o.Volume.ToArray(); _Volume = CreateVolumeVector(builder, __Volume); } var _LoopStartTime = default(VectorOffset); if (_o.LoopStartTime != null) { var __LoopStartTime = _o.LoopStartTime.ToArray(); _LoopStartTime = CreateLoopStartTimeVector(builder, __LoopStartTime); } var _LoopEndTime = default(VectorOffset); if (_o.LoopEndTime != null) { var __LoopEndTime = _o.LoopEndTime.ToArray(); _LoopEndTime = CreateLoopEndTimeVector(builder, __LoopEndTime); } var _LoopTranstionTime = default(VectorOffset); if (_o.LoopTranstionTime != null) { var __LoopTranstionTime = _o.LoopTranstionTime.ToArray(); _LoopTranstionTime = CreateLoopTranstionTimeVector(builder, __LoopTranstionTime); } var _LoopOffsetTime = default(VectorOffset); if (_o.LoopOffsetTime != null) { var __LoopOffsetTime = _o.LoopOffsetTime.ToArray(); _LoopOffsetTime = CreateLoopOffsetTimeVector(builder, __LoopOffsetTime); } return CreateBGMExcel( builder, _o.Id, _Nation_, _Path, _Volume, _LoopStartTime, _LoopEndTime, _LoopTranstionTime, _LoopOffsetTime); } } public class BGMExcelT { public long Id { get; set; } public List Nation_ { get; set; } public List Path { get; set; } public List Volume { get; set; } public List LoopStartTime { get; set; } public List LoopEndTime { get; set; } public List LoopTranstionTime { get; set; } public List LoopOffsetTime { get; set; } public BGMExcelT() { this.Id = 0; this.Nation_ = null; this.Path = null; this.Volume = null; this.LoopStartTime = null; this.LoopEndTime = null; this.LoopTranstionTime = null; this.LoopOffsetTime = null; } } static public class BGMExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*Id*/, 8 /*long*/, 8, false) && verifier.VerifyVectorOfData(tablePos, 6 /*Nation_*/, 4 /*SCHALE.Common.FlatData.Nation*/, false) && verifier.VerifyVectorOfStrings(tablePos, 8 /*Path*/, false) && verifier.VerifyVectorOfData(tablePos, 10 /*Volume*/, 4 /*float*/, false) && verifier.VerifyVectorOfData(tablePos, 12 /*LoopStartTime*/, 4 /*float*/, false) && verifier.VerifyVectorOfData(tablePos, 14 /*LoopEndTime*/, 4 /*float*/, false) && verifier.VerifyVectorOfData(tablePos, 16 /*LoopTranstionTime*/, 4 /*float*/, false) && verifier.VerifyVectorOfData(tablePos, 18 /*LoopOffsetTime*/, 4 /*float*/, false) && verifier.VerifyTableEnd(tablePos); } } }