forked from Raphael/SCHALE.GameServer
98 lines
4.9 KiB
C#
98 lines
4.9 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 BlendData : IFlatbufferObject
|
|
{
|
|
private Table __p;
|
|
public ByteBuffer ByteBuffer { get { return __p.bb; } }
|
|
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
|
|
public static BlendData GetRootAsBlendData(ByteBuffer _bb) { return GetRootAsBlendData(_bb, new BlendData()); }
|
|
public static BlendData GetRootAsBlendData(ByteBuffer _bb, BlendData obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
|
|
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
|
|
public BlendData __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
|
|
|
public int Type { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
|
|
public SCHALE.Common.FlatData.BlendInfo? InfoList(int j) { int o = __p.__offset(6); return o != 0 ? (SCHALE.Common.FlatData.BlendInfo?)(new SCHALE.Common.FlatData.BlendInfo()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
|
|
public int InfoListLength { get { int o = __p.__offset(6); return o != 0 ? __p.__vector_len(o) : 0; } }
|
|
|
|
public static Offset<SCHALE.Common.FlatData.BlendData> CreateBlendData(FlatBufferBuilder builder,
|
|
int Type = 0,
|
|
VectorOffset InfoListOffset = default(VectorOffset)) {
|
|
builder.StartTable(2);
|
|
BlendData.AddInfoList(builder, InfoListOffset);
|
|
BlendData.AddType(builder, Type);
|
|
return BlendData.EndBlendData(builder);
|
|
}
|
|
|
|
public static void StartBlendData(FlatBufferBuilder builder) { builder.StartTable(2); }
|
|
public static void AddType(FlatBufferBuilder builder, int type) { builder.AddInt(0, type, 0); }
|
|
public static void AddInfoList(FlatBufferBuilder builder, VectorOffset infoListOffset) { builder.AddOffset(1, infoListOffset.Value, 0); }
|
|
public static VectorOffset CreateInfoListVector(FlatBufferBuilder builder, Offset<SCHALE.Common.FlatData.BlendInfo>[] 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 CreateInfoListVectorBlock(FlatBufferBuilder builder, Offset<SCHALE.Common.FlatData.BlendInfo>[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
|
|
public static VectorOffset CreateInfoListVectorBlock(FlatBufferBuilder builder, ArraySegment<Offset<SCHALE.Common.FlatData.BlendInfo>> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
|
|
public static VectorOffset CreateInfoListVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<Offset<SCHALE.Common.FlatData.BlendInfo>>(dataPtr, sizeInBytes); return builder.EndVector(); }
|
|
public static void StartInfoListVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
|
|
public static Offset<SCHALE.Common.FlatData.BlendData> EndBlendData(FlatBufferBuilder builder) {
|
|
int o = builder.EndTable();
|
|
return new Offset<SCHALE.Common.FlatData.BlendData>(o);
|
|
}
|
|
public BlendDataT UnPack() {
|
|
var _o = new BlendDataT();
|
|
this.UnPackTo(_o);
|
|
return _o;
|
|
}
|
|
public void UnPackTo(BlendDataT _o) {
|
|
byte[] key = { 0 };
|
|
_o.Type = TableEncryptionService.Convert(this.Type, key);
|
|
_o.InfoList = new List<SCHALE.Common.FlatData.BlendInfoT>();
|
|
for (var _j = 0; _j < this.InfoListLength; ++_j) {_o.InfoList.Add(this.InfoList(_j).HasValue ? this.InfoList(_j).Value.UnPack() : null);}
|
|
}
|
|
public static Offset<SCHALE.Common.FlatData.BlendData> Pack(FlatBufferBuilder builder, BlendDataT _o) {
|
|
if (_o == null) return default(Offset<SCHALE.Common.FlatData.BlendData>);
|
|
var _InfoList = default(VectorOffset);
|
|
if (_o.InfoList != null) {
|
|
var __InfoList = new Offset<SCHALE.Common.FlatData.BlendInfo>[_o.InfoList.Count];
|
|
for (var _j = 0; _j < __InfoList.Length; ++_j) { __InfoList[_j] = SCHALE.Common.FlatData.BlendInfo.Pack(builder, _o.InfoList[_j]); }
|
|
_InfoList = CreateInfoListVector(builder, __InfoList);
|
|
}
|
|
return CreateBlendData(
|
|
builder,
|
|
_o.Type,
|
|
_InfoList);
|
|
}
|
|
}
|
|
|
|
public class BlendDataT
|
|
{
|
|
public int Type { get; set; }
|
|
public List<SCHALE.Common.FlatData.BlendInfoT> InfoList { get; set; }
|
|
|
|
public BlendDataT() {
|
|
this.Type = 0;
|
|
this.InfoList = null;
|
|
}
|
|
}
|
|
|
|
|
|
static public class BlendDataVerify
|
|
{
|
|
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
|
|
{
|
|
return verifier.VerifyTableStart(tablePos)
|
|
&& verifier.VerifyField(tablePos, 4 /*Type*/, 4 /*int*/, 4, false)
|
|
&& verifier.VerifyVectorOfTables(tablePos, 6 /*InfoList*/, SCHALE.Common.FlatData.BlendInfoVerify.Verify, false)
|
|
&& verifier.VerifyTableEnd(tablePos);
|
|
}
|
|
}
|
|
|
|
}
|