SCHALE.GameServer/SCHALE.Common/FlatData/CheatCodeListExcel.cs

136 lines
7.9 KiB
C#
Raw Normal View History

2024-11-08 10:52:05 +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::SCHALE.Common.Crypto;
using global::Google.FlatBuffers;
public struct CheatCodeListExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static CheatCodeListExcel GetRootAsCheatCodeListExcel(ByteBuffer _bb) { return GetRootAsCheatCodeListExcel(_bb, new CheatCodeListExcel()); }
public static CheatCodeListExcel GetRootAsCheatCodeListExcel(ByteBuffer _bb, CheatCodeListExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public CheatCodeListExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public long Id { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public string CheatCode(int j) { int o = __p.__offset(6); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; }
public int CheatCodeLength { get { int o = __p.__offset(6); return o != 0 ? __p.__vector_len(o) : 0; } }
public string InputTitle(int j) { int o = __p.__offset(8); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; }
public int InputTitleLength { get { int o = __p.__offset(8); return o != 0 ? __p.__vector_len(o) : 0; } }
public string Desc { get { int o = __p.__offset(10); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetDescBytes() { return __p.__vector_as_span<byte>(10, 1); }
#else
public ArraySegment<byte>? GetDescBytes() { return __p.__vector_as_arraysegment(10); }
#endif
public byte[] GetDescArray() { return __p.__vector_as_array<byte>(10); }
public static Offset<SCHALE.Common.FlatData.CheatCodeListExcel> CreateCheatCodeListExcel(FlatBufferBuilder builder,
long Id = 0,
VectorOffset CheatCodeOffset = default(VectorOffset),
VectorOffset InputTitleOffset = default(VectorOffset),
StringOffset DescOffset = default(StringOffset)) {
builder.StartTable(4);
CheatCodeListExcel.AddId(builder, Id);
CheatCodeListExcel.AddDesc(builder, DescOffset);
CheatCodeListExcel.AddInputTitle(builder, InputTitleOffset);
CheatCodeListExcel.AddCheatCode(builder, CheatCodeOffset);
return CheatCodeListExcel.EndCheatCodeListExcel(builder);
}
public static void StartCheatCodeListExcel(FlatBufferBuilder builder) { builder.StartTable(4); }
public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); }
public static void AddCheatCode(FlatBufferBuilder builder, VectorOffset cheatCodeOffset) { builder.AddOffset(1, cheatCodeOffset.Value, 0); }
public static VectorOffset CreateCheatCodeVector(FlatBufferBuilder builder, StringOffset[] 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 CreateCheatCodeVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateCheatCodeVectorBlock(FlatBufferBuilder builder, ArraySegment<StringOffset> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateCheatCodeVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<StringOffset>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartCheatCodeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static void AddInputTitle(FlatBufferBuilder builder, VectorOffset inputTitleOffset) { builder.AddOffset(2, inputTitleOffset.Value, 0); }
public static VectorOffset CreateInputTitleVector(FlatBufferBuilder builder, StringOffset[] 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 CreateInputTitleVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateInputTitleVectorBlock(FlatBufferBuilder builder, ArraySegment<StringOffset> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateInputTitleVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<StringOffset>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartInputTitleVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static void AddDesc(FlatBufferBuilder builder, StringOffset descOffset) { builder.AddOffset(3, descOffset.Value, 0); }
public static Offset<SCHALE.Common.FlatData.CheatCodeListExcel> EndCheatCodeListExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.CheatCodeListExcel>(o);
}
public CheatCodeListExcelT UnPack() {
var _o = new CheatCodeListExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(CheatCodeListExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("CheatCodeList");
_o.Id = TableEncryptionService.Convert(this.Id, key);
_o.CheatCode = new List<string>();
for (var _j = 0; _j < this.CheatCodeLength; ++_j) {_o.CheatCode.Add(TableEncryptionService.Convert(this.CheatCode(_j), key));}
_o.InputTitle = new List<string>();
for (var _j = 0; _j < this.InputTitleLength; ++_j) {_o.InputTitle.Add(TableEncryptionService.Convert(this.InputTitle(_j), key));}
_o.Desc = TableEncryptionService.Convert(this.Desc, key);
}
public static Offset<SCHALE.Common.FlatData.CheatCodeListExcel> Pack(FlatBufferBuilder builder, CheatCodeListExcelT _o) {
if (_o == null) return default(Offset<SCHALE.Common.FlatData.CheatCodeListExcel>);
var _CheatCode = default(VectorOffset);
if (_o.CheatCode != null) {
var __CheatCode = new StringOffset[_o.CheatCode.Count];
for (var _j = 0; _j < __CheatCode.Length; ++_j) { __CheatCode[_j] = builder.CreateString(_o.CheatCode[_j]); }
_CheatCode = CreateCheatCodeVector(builder, __CheatCode);
}
var _InputTitle = default(VectorOffset);
if (_o.InputTitle != null) {
var __InputTitle = new StringOffset[_o.InputTitle.Count];
for (var _j = 0; _j < __InputTitle.Length; ++_j) { __InputTitle[_j] = builder.CreateString(_o.InputTitle[_j]); }
_InputTitle = CreateInputTitleVector(builder, __InputTitle);
}
var _Desc = _o.Desc == null ? default(StringOffset) : builder.CreateString(_o.Desc);
return CreateCheatCodeListExcel(
builder,
_o.Id,
_CheatCode,
_InputTitle,
_Desc);
}
}
public class CheatCodeListExcelT
{
public long Id { get; set; }
public List<string> CheatCode { get; set; }
public List<string> InputTitle { get; set; }
public string Desc { get; set; }
public CheatCodeListExcelT() {
this.Id = 0;
this.CheatCode = null;
this.InputTitle = null;
this.Desc = null;
}
}
static public class CheatCodeListExcelVerify
{
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
{
return verifier.VerifyTableStart(tablePos)
&& verifier.VerifyField(tablePos, 4 /*Id*/, 8 /*long*/, 8, false)
&& verifier.VerifyVectorOfStrings(tablePos, 6 /*CheatCode*/, false)
&& verifier.VerifyVectorOfStrings(tablePos, 8 /*InputTitle*/, false)
&& verifier.VerifyString(tablePos, 10 /*Desc*/, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}