SCHALE.GameServer/SCHALE.Common/FlatData/AniStateData.cs

148 lines
9.8 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 AniStateData : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static AniStateData GetRootAsAniStateData(ByteBuffer _bb) { return GetRootAsAniStateData(_bb, new AniStateData()); }
public static AniStateData GetRootAsAniStateData(ByteBuffer _bb, AniStateData obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public AniStateData __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public string StateName { get { int o = __p.__offset(4); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetStateNameBytes() { return __p.__vector_as_span<byte>(4, 1); }
#else
public ArraySegment<byte>? GetStateNameBytes() { return __p.__vector_as_arraysegment(4); }
#endif
public byte[] GetStateNameArray() { return __p.__vector_as_array<byte>(4); }
public string StatePrefix { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetStatePrefixBytes() { return __p.__vector_as_span<byte>(6, 1); }
#else
public ArraySegment<byte>? GetStatePrefixBytes() { return __p.__vector_as_arraysegment(6); }
#endif
public byte[] GetStatePrefixArray() { return __p.__vector_as_array<byte>(6); }
public string StateNameWithPrefix { get { int o = __p.__offset(8); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetStateNameWithPrefixBytes() { return __p.__vector_as_span<byte>(8, 1); }
#else
public ArraySegment<byte>? GetStateNameWithPrefixBytes() { return __p.__vector_as_arraysegment(8); }
#endif
public byte[] GetStateNameWithPrefixArray() { return __p.__vector_as_array<byte>(8); }
public string Tag { get { int o = __p.__offset(10); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetTagBytes() { return __p.__vector_as_span<byte>(10, 1); }
#else
public ArraySegment<byte>? GetTagBytes() { return __p.__vector_as_arraysegment(10); }
#endif
public byte[] GetTagArray() { return __p.__vector_as_array<byte>(10); }
public string SpeedParameterName { get { int o = __p.__offset(12); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetSpeedParameterNameBytes() { return __p.__vector_as_span<byte>(12, 1); }
#else
public ArraySegment<byte>? GetSpeedParameterNameBytes() { return __p.__vector_as_arraysegment(12); }
#endif
public byte[] GetSpeedParameterNameArray() { return __p.__vector_as_array<byte>(12); }
public float SpeedParamter { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } }
public float StateSpeed { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } }
public string ClipName { get { int o = __p.__offset(18); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetClipNameBytes() { return __p.__vector_as_span<byte>(18, 1); }
#else
public ArraySegment<byte>? GetClipNameBytes() { return __p.__vector_as_arraysegment(18); }
#endif
public byte[] GetClipNameArray() { return __p.__vector_as_array<byte>(18); }
public float Length { get { int o = __p.__offset(20); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } }
public float FrameRate { get { int o = __p.__offset(22); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } }
public bool IsLooping { get { int o = __p.__offset(24); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
public SCHALE.Common.FlatData.AniEventData? Events(int j) { int o = __p.__offset(26); return o != 0 ? (SCHALE.Common.FlatData.AniEventData?)(new SCHALE.Common.FlatData.AniEventData()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
public int EventsLength { get { int o = __p.__offset(26); return o != 0 ? __p.__vector_len(o) : 0; } }
public static Offset<SCHALE.Common.FlatData.AniStateData> CreateAniStateData(FlatBufferBuilder builder,
StringOffset StateNameOffset = default(StringOffset),
StringOffset StatePrefixOffset = default(StringOffset),
StringOffset StateNameWithPrefixOffset = default(StringOffset),
StringOffset TagOffset = default(StringOffset),
StringOffset SpeedParameterNameOffset = default(StringOffset),
float SpeedParamter = 0.0f,
float StateSpeed = 0.0f,
StringOffset ClipNameOffset = default(StringOffset),
float Length = 0.0f,
float FrameRate = 0.0f,
bool IsLooping = false,
VectorOffset EventsOffset = default(VectorOffset)) {
builder.StartTable(12);
AniStateData.AddEvents(builder, EventsOffset);
AniStateData.AddFrameRate(builder, FrameRate);
AniStateData.AddLength(builder, Length);
AniStateData.AddClipName(builder, ClipNameOffset);
AniStateData.AddStateSpeed(builder, StateSpeed);
AniStateData.AddSpeedParamter(builder, SpeedParamter);
AniStateData.AddSpeedParameterName(builder, SpeedParameterNameOffset);
AniStateData.AddTag(builder, TagOffset);
AniStateData.AddStateNameWithPrefix(builder, StateNameWithPrefixOffset);
AniStateData.AddStatePrefix(builder, StatePrefixOffset);
AniStateData.AddStateName(builder, StateNameOffset);
AniStateData.AddIsLooping(builder, IsLooping);
return AniStateData.EndAniStateData(builder);
}
public static void StartAniStateData(FlatBufferBuilder builder) { builder.StartTable(12); }
public static void AddStateName(FlatBufferBuilder builder, StringOffset stateNameOffset) { builder.AddOffset(0, stateNameOffset.Value, 0); }
public static void AddStatePrefix(FlatBufferBuilder builder, StringOffset statePrefixOffset) { builder.AddOffset(1, statePrefixOffset.Value, 0); }
public static void AddStateNameWithPrefix(FlatBufferBuilder builder, StringOffset stateNameWithPrefixOffset) { builder.AddOffset(2, stateNameWithPrefixOffset.Value, 0); }
public static void AddTag(FlatBufferBuilder builder, StringOffset tagOffset) { builder.AddOffset(3, tagOffset.Value, 0); }
public static void AddSpeedParameterName(FlatBufferBuilder builder, StringOffset speedParameterNameOffset) { builder.AddOffset(4, speedParameterNameOffset.Value, 0); }
public static void AddSpeedParamter(FlatBufferBuilder builder, float speedParamter) { builder.AddFloat(5, speedParamter, 0.0f); }
public static void AddStateSpeed(FlatBufferBuilder builder, float stateSpeed) { builder.AddFloat(6, stateSpeed, 0.0f); }
public static void AddClipName(FlatBufferBuilder builder, StringOffset clipNameOffset) { builder.AddOffset(7, clipNameOffset.Value, 0); }
public static void AddLength(FlatBufferBuilder builder, float length) { builder.AddFloat(8, length, 0.0f); }
public static void AddFrameRate(FlatBufferBuilder builder, float frameRate) { builder.AddFloat(9, frameRate, 0.0f); }
public static void AddIsLooping(FlatBufferBuilder builder, bool isLooping) { builder.AddBool(10, isLooping, false); }
public static void AddEvents(FlatBufferBuilder builder, VectorOffset eventsOffset) { builder.AddOffset(11, eventsOffset.Value, 0); }
public static VectorOffset CreateEventsVector(FlatBufferBuilder builder, Offset<SCHALE.Common.FlatData.AniEventData>[] 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 CreateEventsVectorBlock(FlatBufferBuilder builder, Offset<SCHALE.Common.FlatData.AniEventData>[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateEventsVectorBlock(FlatBufferBuilder builder, ArraySegment<Offset<SCHALE.Common.FlatData.AniEventData>> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateEventsVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<Offset<SCHALE.Common.FlatData.AniEventData>>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartEventsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static Offset<SCHALE.Common.FlatData.AniStateData> EndAniStateData(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.AniStateData>(o);
}
}
static public class AniStateDataVerify
{
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
{
return verifier.VerifyTableStart(tablePos)
&& verifier.VerifyString(tablePos, 4 /*StateName*/, false)
&& verifier.VerifyString(tablePos, 6 /*StatePrefix*/, false)
&& verifier.VerifyString(tablePos, 8 /*StateNameWithPrefix*/, false)
&& verifier.VerifyString(tablePos, 10 /*Tag*/, false)
&& verifier.VerifyString(tablePos, 12 /*SpeedParameterName*/, false)
&& verifier.VerifyField(tablePos, 14 /*SpeedParamter*/, 4 /*float*/, 4, false)
&& verifier.VerifyField(tablePos, 16 /*StateSpeed*/, 4 /*float*/, 4, false)
&& verifier.VerifyString(tablePos, 18 /*ClipName*/, false)
&& verifier.VerifyField(tablePos, 20 /*Length*/, 4 /*float*/, 4, false)
&& verifier.VerifyField(tablePos, 22 /*FrameRate*/, 4 /*float*/, 4, false)
&& verifier.VerifyField(tablePos, 24 /*IsLooping*/, 1 /*bool*/, 1, false)
&& verifier.VerifyVectorOfTables(tablePos, 26 /*Events*/, SCHALE.Common.FlatData.AniEventDataVerify.Verify, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}