SCHALE.GameServer/SCHALE.Common/FlatData/OperatorExcel.cs

136 lines
9.2 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 OperatorExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static OperatorExcel GetRootAsOperatorExcel(ByteBuffer _bb) { return GetRootAsOperatorExcel(_bb, new OperatorExcel()); }
public static OperatorExcel GetRootAsOperatorExcel(ByteBuffer _bb, OperatorExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public OperatorExcel __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 string GroupId { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetGroupIdBytes() { return __p.__vector_as_span<byte>(6, 1); }
#else
public ArraySegment<byte>? GetGroupIdBytes() { return __p.__vector_as_arraysegment(6); }
#endif
public byte[] GetGroupIdArray() { return __p.__vector_as_array<byte>(6); }
public SCHALE.Common.FlatData.OperatorCondition OperatorCondition { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.OperatorCondition)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.OperatorCondition.None; } }
public int OutputSequence { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
public int RandomWeight { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
public int OutputDelay { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
public int Duration { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
public int OperatorOutputPriority { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
public string PortraitPath { get { int o = __p.__offset(20); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetPortraitPathBytes() { return __p.__vector_as_span<byte>(20, 1); }
#else
public ArraySegment<byte>? GetPortraitPathBytes() { return __p.__vector_as_arraysegment(20); }
#endif
public byte[] GetPortraitPathArray() { return __p.__vector_as_array<byte>(20); }
public string TextLocalizeKey { get { int o = __p.__offset(22); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetTextLocalizeKeyBytes() { return __p.__vector_as_span<byte>(22, 1); }
#else
public ArraySegment<byte>? GetTextLocalizeKeyBytes() { return __p.__vector_as_arraysegment(22); }
#endif
public byte[] GetTextLocalizeKeyArray() { return __p.__vector_as_array<byte>(22); }
public uint VoiceId(int j) { int o = __p.__offset(24); return o != 0 ? __p.bb.GetUint(__p.__vector(o) + j * 4) : (uint)0; }
public int VoiceIdLength { get { int o = __p.__offset(24); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span<uint> GetVoiceIdBytes() { return __p.__vector_as_span<uint>(24, 4); }
#else
public ArraySegment<byte>? GetVoiceIdBytes() { return __p.__vector_as_arraysegment(24); }
#endif
public uint[] GetVoiceIdArray() { return __p.__vector_as_array<uint>(24); }
public bool OperatorWaitQueue { get { int o = __p.__offset(26); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
public static Offset<SCHALE.Common.FlatData.OperatorExcel> CreateOperatorExcel(FlatBufferBuilder builder,
long UniqueId = 0,
StringOffset GroupIdOffset = default(StringOffset),
SCHALE.Common.FlatData.OperatorCondition OperatorCondition = SCHALE.Common.FlatData.OperatorCondition.None,
int OutputSequence = 0,
int RandomWeight = 0,
int OutputDelay = 0,
int Duration = 0,
int OperatorOutputPriority = 0,
StringOffset PortraitPathOffset = default(StringOffset),
StringOffset TextLocalizeKeyOffset = default(StringOffset),
VectorOffset VoiceIdOffset = default(VectorOffset),
bool OperatorWaitQueue = false) {
builder.StartTable(12);
OperatorExcel.AddUniqueId(builder, UniqueId);
OperatorExcel.AddVoiceId(builder, VoiceIdOffset);
OperatorExcel.AddTextLocalizeKey(builder, TextLocalizeKeyOffset);
OperatorExcel.AddPortraitPath(builder, PortraitPathOffset);
OperatorExcel.AddOperatorOutputPriority(builder, OperatorOutputPriority);
OperatorExcel.AddDuration(builder, Duration);
OperatorExcel.AddOutputDelay(builder, OutputDelay);
OperatorExcel.AddRandomWeight(builder, RandomWeight);
OperatorExcel.AddOutputSequence(builder, OutputSequence);
OperatorExcel.AddOperatorCondition(builder, OperatorCondition);
OperatorExcel.AddGroupId(builder, GroupIdOffset);
OperatorExcel.AddOperatorWaitQueue(builder, OperatorWaitQueue);
return OperatorExcel.EndOperatorExcel(builder);
}
public static void StartOperatorExcel(FlatBufferBuilder builder) { builder.StartTable(12); }
public static void AddUniqueId(FlatBufferBuilder builder, long uniqueId) { builder.AddLong(0, uniqueId, 0); }
public static void AddGroupId(FlatBufferBuilder builder, StringOffset groupIdOffset) { builder.AddOffset(1, groupIdOffset.Value, 0); }
public static void AddOperatorCondition(FlatBufferBuilder builder, SCHALE.Common.FlatData.OperatorCondition operatorCondition) { builder.AddInt(2, (int)operatorCondition, 0); }
public static void AddOutputSequence(FlatBufferBuilder builder, int outputSequence) { builder.AddInt(3, outputSequence, 0); }
public static void AddRandomWeight(FlatBufferBuilder builder, int randomWeight) { builder.AddInt(4, randomWeight, 0); }
public static void AddOutputDelay(FlatBufferBuilder builder, int outputDelay) { builder.AddInt(5, outputDelay, 0); }
public static void AddDuration(FlatBufferBuilder builder, int duration) { builder.AddInt(6, duration, 0); }
public static void AddOperatorOutputPriority(FlatBufferBuilder builder, int operatorOutputPriority) { builder.AddInt(7, operatorOutputPriority, 0); }
public static void AddPortraitPath(FlatBufferBuilder builder, StringOffset portraitPathOffset) { builder.AddOffset(8, portraitPathOffset.Value, 0); }
public static void AddTextLocalizeKey(FlatBufferBuilder builder, StringOffset textLocalizeKeyOffset) { builder.AddOffset(9, textLocalizeKeyOffset.Value, 0); }
public static void AddVoiceId(FlatBufferBuilder builder, VectorOffset voiceIdOffset) { builder.AddOffset(10, voiceIdOffset.Value, 0); }
public static VectorOffset CreateVoiceIdVector(FlatBufferBuilder builder, uint[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddUint(data[i]); return builder.EndVector(); }
public static VectorOffset CreateVoiceIdVectorBlock(FlatBufferBuilder builder, uint[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateVoiceIdVectorBlock(FlatBufferBuilder builder, ArraySegment<uint> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateVoiceIdVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<uint>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartVoiceIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static void AddOperatorWaitQueue(FlatBufferBuilder builder, bool operatorWaitQueue) { builder.AddBool(11, operatorWaitQueue, false); }
public static Offset<SCHALE.Common.FlatData.OperatorExcel> EndOperatorExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.OperatorExcel>(o);
}
}
static public class OperatorExcelVerify
{
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
{
return verifier.VerifyTableStart(tablePos)
&& verifier.VerifyField(tablePos, 4 /*UniqueId*/, 8 /*long*/, 8, false)
&& verifier.VerifyString(tablePos, 6 /*GroupId*/, false)
&& verifier.VerifyField(tablePos, 8 /*OperatorCondition*/, 4 /*SCHALE.Common.FlatData.OperatorCondition*/, 4, false)
&& verifier.VerifyField(tablePos, 10 /*OutputSequence*/, 4 /*int*/, 4, false)
&& verifier.VerifyField(tablePos, 12 /*RandomWeight*/, 4 /*int*/, 4, false)
&& verifier.VerifyField(tablePos, 14 /*OutputDelay*/, 4 /*int*/, 4, false)
&& verifier.VerifyField(tablePos, 16 /*Duration*/, 4 /*int*/, 4, false)
&& verifier.VerifyField(tablePos, 18 /*OperatorOutputPriority*/, 4 /*int*/, 4, false)
&& verifier.VerifyString(tablePos, 20 /*PortraitPath*/, false)
&& verifier.VerifyString(tablePos, 22 /*TextLocalizeKey*/, false)
&& verifier.VerifyVectorOfData(tablePos, 24 /*VoiceId*/, 4 /*uint*/, false)
&& verifier.VerifyField(tablePos, 26 /*OperatorWaitQueue*/, 1 /*bool*/, 1, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}