SCHALE.GameServer/SCHALE.Common/FlatData/BlendData.cs

62 lines
3.7 KiB
C#
Raw Normal View History

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;
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);
}
}
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);
}
}
}