forked from Raphael/SCHALE.GameServer
148 lines
8.3 KiB
C#
148 lines
8.3 KiB
C#
// <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;
|
|
using global::SCHALE.Common.Crypto;
|
|
using global::Google.FlatBuffers;
|
|
|
|
public struct DefaultEchelonExcel : IFlatbufferObject
|
|
{
|
|
private Table __p;
|
|
public ByteBuffer ByteBuffer { get { return __p.bb; } }
|
|
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
|
|
public static DefaultEchelonExcel GetRootAsDefaultEchelonExcel(ByteBuffer _bb) { return GetRootAsDefaultEchelonExcel(_bb, new DefaultEchelonExcel()); }
|
|
public static DefaultEchelonExcel GetRootAsDefaultEchelonExcel(ByteBuffer _bb, DefaultEchelonExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
|
|
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
|
|
public DefaultEchelonExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
|
|
|
public int EchlonId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
|
|
public long LeaderId { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
|
|
public long MainId(int j) { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
|
|
public int MainIdLength { get { int o = __p.__offset(8); return o != 0 ? __p.__vector_len(o) : 0; } }
|
|
#if ENABLE_SPAN_T
|
|
public Span<long> GetMainIdBytes() { return __p.__vector_as_span<long>(8, 8); }
|
|
#else
|
|
public ArraySegment<byte>? GetMainIdBytes() { return __p.__vector_as_arraysegment(8); }
|
|
#endif
|
|
public long[] GetMainIdArray() { return __p.__vector_as_array<long>(8); }
|
|
public long SupportId(int j) { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
|
|
public int SupportIdLength { get { int o = __p.__offset(10); return o != 0 ? __p.__vector_len(o) : 0; } }
|
|
#if ENABLE_SPAN_T
|
|
public Span<long> GetSupportIdBytes() { return __p.__vector_as_span<long>(10, 8); }
|
|
#else
|
|
public ArraySegment<byte>? GetSupportIdBytes() { return __p.__vector_as_arraysegment(10); }
|
|
#endif
|
|
public long[] GetSupportIdArray() { return __p.__vector_as_array<long>(10); }
|
|
public long TssId { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
|
|
|
|
public static Offset<SCHALE.Common.FlatData.DefaultEchelonExcel> CreateDefaultEchelonExcel(FlatBufferBuilder builder,
|
|
int EchlonId = 0,
|
|
long LeaderId = 0,
|
|
VectorOffset MainIdOffset = default(VectorOffset),
|
|
VectorOffset SupportIdOffset = default(VectorOffset),
|
|
long TssId = 0) {
|
|
builder.StartTable(5);
|
|
DefaultEchelonExcel.AddTssId(builder, TssId);
|
|
DefaultEchelonExcel.AddLeaderId(builder, LeaderId);
|
|
DefaultEchelonExcel.AddSupportId(builder, SupportIdOffset);
|
|
DefaultEchelonExcel.AddMainId(builder, MainIdOffset);
|
|
DefaultEchelonExcel.AddEchlonId(builder, EchlonId);
|
|
return DefaultEchelonExcel.EndDefaultEchelonExcel(builder);
|
|
}
|
|
|
|
public static void StartDefaultEchelonExcel(FlatBufferBuilder builder) { builder.StartTable(5); }
|
|
public static void AddEchlonId(FlatBufferBuilder builder, int echlonId) { builder.AddInt(0, echlonId, 0); }
|
|
public static void AddLeaderId(FlatBufferBuilder builder, long leaderId) { builder.AddLong(1, leaderId, 0); }
|
|
public static void AddMainId(FlatBufferBuilder builder, VectorOffset mainIdOffset) { builder.AddOffset(2, mainIdOffset.Value, 0); }
|
|
public static VectorOffset CreateMainIdVector(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddLong(data[i]); return builder.EndVector(); }
|
|
public static VectorOffset CreateMainIdVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
|
|
public static VectorOffset CreateMainIdVectorBlock(FlatBufferBuilder builder, ArraySegment<long> data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
|
|
public static VectorOffset CreateMainIdVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<long>(dataPtr, sizeInBytes); return builder.EndVector(); }
|
|
public static void StartMainIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
|
|
public static void AddSupportId(FlatBufferBuilder builder, VectorOffset supportIdOffset) { builder.AddOffset(3, supportIdOffset.Value, 0); }
|
|
public static VectorOffset CreateSupportIdVector(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddLong(data[i]); return builder.EndVector(); }
|
|
public static VectorOffset CreateSupportIdVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
|
|
public static VectorOffset CreateSupportIdVectorBlock(FlatBufferBuilder builder, ArraySegment<long> data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
|
|
public static VectorOffset CreateSupportIdVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<long>(dataPtr, sizeInBytes); return builder.EndVector(); }
|
|
public static void StartSupportIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
|
|
public static void AddTssId(FlatBufferBuilder builder, long tssId) { builder.AddLong(4, tssId, 0); }
|
|
public static Offset<SCHALE.Common.FlatData.DefaultEchelonExcel> EndDefaultEchelonExcel(FlatBufferBuilder builder) {
|
|
int o = builder.EndTable();
|
|
return new Offset<SCHALE.Common.FlatData.DefaultEchelonExcel>(o);
|
|
}
|
|
public DefaultEchelonExcelT UnPack() {
|
|
var _o = new DefaultEchelonExcelT();
|
|
this.UnPackTo(_o);
|
|
return _o;
|
|
}
|
|
public void UnPackTo(DefaultEchelonExcelT _o) {
|
|
byte[] key = TableEncryptionService.CreateKey("DefaultEchelon");
|
|
_o.EchlonId = TableEncryptionService.Convert(this.EchlonId, key);
|
|
_o.LeaderId = TableEncryptionService.Convert(this.LeaderId, key);
|
|
_o.MainId = new List<long>();
|
|
for (var _j = 0; _j < this.MainIdLength; ++_j) {_o.MainId.Add(TableEncryptionService.Convert(this.MainId(_j), key));}
|
|
_o.SupportId = new List<long>();
|
|
for (var _j = 0; _j < this.SupportIdLength; ++_j) {_o.SupportId.Add(TableEncryptionService.Convert(this.SupportId(_j), key));}
|
|
_o.TssId = TableEncryptionService.Convert(this.TssId, key);
|
|
}
|
|
public static Offset<SCHALE.Common.FlatData.DefaultEchelonExcel> Pack(FlatBufferBuilder builder, DefaultEchelonExcelT _o) {
|
|
if (_o == null) return default(Offset<SCHALE.Common.FlatData.DefaultEchelonExcel>);
|
|
var _MainId = default(VectorOffset);
|
|
if (_o.MainId != null) {
|
|
var __MainId = _o.MainId.ToArray();
|
|
_MainId = CreateMainIdVector(builder, __MainId);
|
|
}
|
|
var _SupportId = default(VectorOffset);
|
|
if (_o.SupportId != null) {
|
|
var __SupportId = _o.SupportId.ToArray();
|
|
_SupportId = CreateSupportIdVector(builder, __SupportId);
|
|
}
|
|
return CreateDefaultEchelonExcel(
|
|
builder,
|
|
_o.EchlonId,
|
|
_o.LeaderId,
|
|
_MainId,
|
|
_SupportId,
|
|
_o.TssId);
|
|
}
|
|
}
|
|
|
|
public class DefaultEchelonExcelT
|
|
{
|
|
public int EchlonId { get; set; }
|
|
public long LeaderId { get; set; }
|
|
public List<long> MainId { get; set; }
|
|
public List<long> SupportId { get; set; }
|
|
public long TssId { get; set; }
|
|
|
|
public DefaultEchelonExcelT() {
|
|
this.EchlonId = 0;
|
|
this.LeaderId = 0;
|
|
this.MainId = null;
|
|
this.SupportId = null;
|
|
this.TssId = 0;
|
|
}
|
|
}
|
|
|
|
|
|
static public class DefaultEchelonExcelVerify
|
|
{
|
|
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
|
|
{
|
|
return verifier.VerifyTableStart(tablePos)
|
|
&& verifier.VerifyField(tablePos, 4 /*EchlonId*/, 4 /*int*/, 4, false)
|
|
&& verifier.VerifyField(tablePos, 6 /*LeaderId*/, 8 /*long*/, 8, false)
|
|
&& verifier.VerifyVectorOfData(tablePos, 8 /*MainId*/, 8 /*long*/, false)
|
|
&& verifier.VerifyVectorOfData(tablePos, 10 /*SupportId*/, 8 /*long*/, false)
|
|
&& verifier.VerifyField(tablePos, 12 /*TssId*/, 8 /*long*/, 8, false)
|
|
&& verifier.VerifyTableEnd(tablePos);
|
|
}
|
|
}
|
|
|
|
}
|