SCHALE.GameServer/SCHALE.Common/FlatData/ShopFreeRecruitExcel.cs

106 lines
7.3 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::Google.FlatBuffers;
public struct ShopFreeRecruitExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static ShopFreeRecruitExcel GetRootAsShopFreeRecruitExcel(ByteBuffer _bb) { return GetRootAsShopFreeRecruitExcel(_bb, new ShopFreeRecruitExcel()); }
public static ShopFreeRecruitExcel GetRootAsShopFreeRecruitExcel(ByteBuffer _bb, ShopFreeRecruitExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public ShopFreeRecruitExcel __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 FreeRecruitPeriodFrom { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetFreeRecruitPeriodFromBytes() { return __p.__vector_as_span<byte>(6, 1); }
#else
public ArraySegment<byte>? GetFreeRecruitPeriodFromBytes() { return __p.__vector_as_arraysegment(6); }
#endif
public byte[] GetFreeRecruitPeriodFromArray() { return __p.__vector_as_array<byte>(6); }
public string FreeRecruitPeriodTo { get { int o = __p.__offset(8); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetFreeRecruitPeriodToBytes() { return __p.__vector_as_span<byte>(8, 1); }
#else
public ArraySegment<byte>? GetFreeRecruitPeriodToBytes() { return __p.__vector_as_arraysegment(8); }
#endif
public byte[] GetFreeRecruitPeriodToArray() { return __p.__vector_as_array<byte>(8); }
public SCHALE.Common.FlatData.ShopFreeRecruitType FreeRecruitType { get { int o = __p.__offset(10); return o != 0 ? (SCHALE.Common.FlatData.ShopFreeRecruitType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ShopFreeRecruitType.None; } }
public string FreeRecruitDecorationImagePath { get { int o = __p.__offset(12); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetFreeRecruitDecorationImagePathBytes() { return __p.__vector_as_span<byte>(12, 1); }
#else
public ArraySegment<byte>? GetFreeRecruitDecorationImagePathBytes() { return __p.__vector_as_arraysegment(12); }
#endif
public byte[] GetFreeRecruitDecorationImagePathArray() { return __p.__vector_as_array<byte>(12); }
public long ShopRecruitId(int j) { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
public int ShopRecruitIdLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span<long> GetShopRecruitIdBytes() { return __p.__vector_as_span<long>(14, 8); }
#else
public ArraySegment<byte>? GetShopRecruitIdBytes() { return __p.__vector_as_arraysegment(14); }
#endif
public long[] GetShopRecruitIdArray() { return __p.__vector_as_array<long>(14); }
public static Offset<SCHALE.Common.FlatData.ShopFreeRecruitExcel> CreateShopFreeRecruitExcel(FlatBufferBuilder builder,
long Id = 0,
StringOffset FreeRecruitPeriodFromOffset = default(StringOffset),
StringOffset FreeRecruitPeriodToOffset = default(StringOffset),
SCHALE.Common.FlatData.ShopFreeRecruitType FreeRecruitType = SCHALE.Common.FlatData.ShopFreeRecruitType.None,
StringOffset FreeRecruitDecorationImagePathOffset = default(StringOffset),
VectorOffset ShopRecruitIdOffset = default(VectorOffset)) {
builder.StartTable(6);
ShopFreeRecruitExcel.AddId(builder, Id);
ShopFreeRecruitExcel.AddShopRecruitId(builder, ShopRecruitIdOffset);
ShopFreeRecruitExcel.AddFreeRecruitDecorationImagePath(builder, FreeRecruitDecorationImagePathOffset);
ShopFreeRecruitExcel.AddFreeRecruitType(builder, FreeRecruitType);
ShopFreeRecruitExcel.AddFreeRecruitPeriodTo(builder, FreeRecruitPeriodToOffset);
ShopFreeRecruitExcel.AddFreeRecruitPeriodFrom(builder, FreeRecruitPeriodFromOffset);
return ShopFreeRecruitExcel.EndShopFreeRecruitExcel(builder);
}
public static void StartShopFreeRecruitExcel(FlatBufferBuilder builder) { builder.StartTable(6); }
public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); }
public static void AddFreeRecruitPeriodFrom(FlatBufferBuilder builder, StringOffset freeRecruitPeriodFromOffset) { builder.AddOffset(1, freeRecruitPeriodFromOffset.Value, 0); }
public static void AddFreeRecruitPeriodTo(FlatBufferBuilder builder, StringOffset freeRecruitPeriodToOffset) { builder.AddOffset(2, freeRecruitPeriodToOffset.Value, 0); }
public static void AddFreeRecruitType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ShopFreeRecruitType freeRecruitType) { builder.AddInt(3, (int)freeRecruitType, 0); }
public static void AddFreeRecruitDecorationImagePath(FlatBufferBuilder builder, StringOffset freeRecruitDecorationImagePathOffset) { builder.AddOffset(4, freeRecruitDecorationImagePathOffset.Value, 0); }
public static void AddShopRecruitId(FlatBufferBuilder builder, VectorOffset shopRecruitIdOffset) { builder.AddOffset(5, shopRecruitIdOffset.Value, 0); }
public static VectorOffset CreateShopRecruitIdVector(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddLong(data[i]); return builder.EndVector(); }
public static VectorOffset CreateShopRecruitIdVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateShopRecruitIdVectorBlock(FlatBufferBuilder builder, ArraySegment<long> data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateShopRecruitIdVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<long>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartShopRecruitIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
public static Offset<SCHALE.Common.FlatData.ShopFreeRecruitExcel> EndShopFreeRecruitExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.ShopFreeRecruitExcel>(o);
}
}
static public class ShopFreeRecruitExcelVerify
{
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
{
return verifier.VerifyTableStart(tablePos)
&& verifier.VerifyField(tablePos, 4 /*Id*/, 8 /*long*/, 8, false)
&& verifier.VerifyString(tablePos, 6 /*FreeRecruitPeriodFrom*/, false)
&& verifier.VerifyString(tablePos, 8 /*FreeRecruitPeriodTo*/, false)
&& verifier.VerifyField(tablePos, 10 /*FreeRecruitType*/, 4 /*SCHALE.Common.FlatData.ShopFreeRecruitType*/, 4, false)
&& verifier.VerifyString(tablePos, 12 /*FreeRecruitDecorationImagePath*/, false)
&& verifier.VerifyVectorOfData(tablePos, 14 /*ShopRecruitId*/, 8 /*long*/, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}