2024-04-21 00:21:57 +00:00
|
|
|
// <auto-generated>
|
|
|
|
// automatically generated by the FlatBuffers compiler, do not modify
|
|
|
|
// </auto-generated>
|
|
|
|
|
|
|
|
namespace SCHALE.Common.FlatData
|
|
|
|
{
|
|
|
|
|
|
|
|
using global::System;
|
|
|
|
using global::System.Collections.Generic;
|
2024-04-29 15:52:45 +00:00
|
|
|
using global::SCHALE.Common.Crypto;
|
2024-04-21 00:21:57 +00:00
|
|
|
using global::Google.FlatBuffers;
|
|
|
|
|
|
|
|
public struct VoiceExcel : IFlatbufferObject
|
|
|
|
{
|
|
|
|
private Table __p;
|
|
|
|
public ByteBuffer ByteBuffer { get { return __p.bb; } }
|
|
|
|
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
|
|
|
|
public static VoiceExcel GetRootAsVoiceExcel(ByteBuffer _bb) { return GetRootAsVoiceExcel(_bb, new VoiceExcel()); }
|
|
|
|
public static VoiceExcel GetRootAsVoiceExcel(ByteBuffer _bb, VoiceExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
|
|
|
|
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
|
|
|
|
public VoiceExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
|
|
|
|
|
|
|
public long UniqueId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
|
|
|
|
public uint Id { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } }
|
|
|
|
public SCHALE.Common.FlatData.Nation Nation_(int j) { int o = __p.__offset(8); 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(8); return o != 0 ? __p.__vector_len(o) : 0; } }
|
|
|
|
#if ENABLE_SPAN_T
|
|
|
|
public Span<SCHALE.Common.FlatData.Nation> GetNation_Bytes() { return __p.__vector_as_span<SCHALE.Common.FlatData.Nation>(8, 4); }
|
|
|
|
#else
|
|
|
|
public ArraySegment<byte>? GetNation_Bytes() { return __p.__vector_as_arraysegment(8); }
|
|
|
|
#endif
|
|
|
|
public SCHALE.Common.FlatData.Nation[] GetNation_Array() { int o = __p.__offset(8); 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(10); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; }
|
|
|
|
public int PathLength { get { int o = __p.__offset(10); return o != 0 ? __p.__vector_len(o) : 0; } }
|
|
|
|
public float Volume(int j) { int o = __p.__offset(12); return o != 0 ? __p.bb.GetFloat(__p.__vector(o) + j * 4) : (float)0; }
|
|
|
|
public int VolumeLength { get { int o = __p.__offset(12); return o != 0 ? __p.__vector_len(o) : 0; } }
|
|
|
|
#if ENABLE_SPAN_T
|
|
|
|
public Span<float> GetVolumeBytes() { return __p.__vector_as_span<float>(12, 4); }
|
|
|
|
#else
|
|
|
|
public ArraySegment<byte>? GetVolumeBytes() { return __p.__vector_as_arraysegment(12); }
|
|
|
|
#endif
|
|
|
|
public float[] GetVolumeArray() { return __p.__vector_as_array<float>(12); }
|
|
|
|
|
|
|
|
public static Offset<SCHALE.Common.FlatData.VoiceExcel> CreateVoiceExcel(FlatBufferBuilder builder,
|
|
|
|
long UniqueId = 0,
|
|
|
|
uint Id = 0,
|
|
|
|
VectorOffset Nation_Offset = default(VectorOffset),
|
|
|
|
VectorOffset PathOffset = default(VectorOffset),
|
|
|
|
VectorOffset VolumeOffset = default(VectorOffset)) {
|
|
|
|
builder.StartTable(5);
|
|
|
|
VoiceExcel.AddUniqueId(builder, UniqueId);
|
|
|
|
VoiceExcel.AddVolume(builder, VolumeOffset);
|
|
|
|
VoiceExcel.AddPath(builder, PathOffset);
|
|
|
|
VoiceExcel.AddNation_(builder, Nation_Offset);
|
|
|
|
VoiceExcel.AddId(builder, Id);
|
|
|
|
return VoiceExcel.EndVoiceExcel(builder);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void StartVoiceExcel(FlatBufferBuilder builder) { builder.StartTable(5); }
|
|
|
|
public static void AddUniqueId(FlatBufferBuilder builder, long uniqueId) { builder.AddLong(0, uniqueId, 0); }
|
|
|
|
public static void AddId(FlatBufferBuilder builder, uint id) { builder.AddUint(1, id, 0); }
|
|
|
|
public static void AddNation_(FlatBufferBuilder builder, VectorOffset nation_Offset) { builder.AddOffset(2, 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<SCHALE.Common.FlatData.Nation> 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<SCHALE.Common.FlatData.Nation>(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(3, 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<StringOffset> 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<StringOffset>(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(4, 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<float> 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<float>(dataPtr, sizeInBytes); return builder.EndVector(); }
|
|
|
|
public static void StartVolumeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
|
|
|
|
public static Offset<SCHALE.Common.FlatData.VoiceExcel> EndVoiceExcel(FlatBufferBuilder builder) {
|
|
|
|
int o = builder.EndTable();
|
|
|
|
return new Offset<SCHALE.Common.FlatData.VoiceExcel>(o);
|
|
|
|
}
|
2024-04-29 15:52:45 +00:00
|
|
|
public VoiceExcelT UnPack() {
|
|
|
|
var _o = new VoiceExcelT();
|
|
|
|
this.UnPackTo(_o);
|
|
|
|
return _o;
|
|
|
|
}
|
|
|
|
public void UnPackTo(VoiceExcelT _o) {
|
|
|
|
byte[] key = TableEncryptionService.CreateKey("Voice");
|
|
|
|
_o.UniqueId = TableEncryptionService.Convert(this.UniqueId, key);
|
|
|
|
_o.Id = TableEncryptionService.Convert(this.Id, key);
|
|
|
|
_o.Nation_ = new List<SCHALE.Common.FlatData.Nation>();
|
|
|
|
for (var _j = 0; _j < this.Nation_Length; ++_j) {_o.Nation_.Add(TableEncryptionService.Convert(this.Nation_(_j), key));}
|
|
|
|
_o.Path = new List<string>();
|
|
|
|
for (var _j = 0; _j < this.PathLength; ++_j) {_o.Path.Add(TableEncryptionService.Convert(this.Path(_j), key));}
|
|
|
|
_o.Volume = new List<float>();
|
|
|
|
for (var _j = 0; _j < this.VolumeLength; ++_j) {_o.Volume.Add(TableEncryptionService.Convert(this.Volume(_j), key));}
|
|
|
|
}
|
|
|
|
public static Offset<SCHALE.Common.FlatData.VoiceExcel> Pack(FlatBufferBuilder builder, VoiceExcelT _o) {
|
|
|
|
if (_o == null) return default(Offset<SCHALE.Common.FlatData.VoiceExcel>);
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
return CreateVoiceExcel(
|
|
|
|
builder,
|
|
|
|
_o.UniqueId,
|
|
|
|
_o.Id,
|
|
|
|
_Nation_,
|
|
|
|
_Path,
|
|
|
|
_Volume);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public class VoiceExcelT
|
|
|
|
{
|
|
|
|
public long UniqueId { get; set; }
|
|
|
|
public uint Id { get; set; }
|
|
|
|
public List<SCHALE.Common.FlatData.Nation> Nation_ { get; set; }
|
|
|
|
public List<string> Path { get; set; }
|
|
|
|
public List<float> Volume { get; set; }
|
|
|
|
|
|
|
|
public VoiceExcelT() {
|
|
|
|
this.UniqueId = 0;
|
|
|
|
this.Id = 0;
|
|
|
|
this.Nation_ = null;
|
|
|
|
this.Path = null;
|
|
|
|
this.Volume = null;
|
|
|
|
}
|
2024-04-21 00:21:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static public class VoiceExcelVerify
|
|
|
|
{
|
|
|
|
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
|
|
|
|
{
|
|
|
|
return verifier.VerifyTableStart(tablePos)
|
|
|
|
&& verifier.VerifyField(tablePos, 4 /*UniqueId*/, 8 /*long*/, 8, false)
|
|
|
|
&& verifier.VerifyField(tablePos, 6 /*Id*/, 4 /*uint*/, 4, false)
|
|
|
|
&& verifier.VerifyVectorOfData(tablePos, 8 /*Nation_*/, 4 /*SCHALE.Common.FlatData.Nation*/, false)
|
|
|
|
&& verifier.VerifyVectorOfStrings(tablePos, 10 /*Path*/, false)
|
|
|
|
&& verifier.VerifyVectorOfData(tablePos, 12 /*Volume*/, 4 /*float*/, false)
|
|
|
|
&& verifier.VerifyTableEnd(tablePos);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|