SCHALE.GameServer/SCHALE.Common/FlatData/TranscendenceRecipeExcel.cs

191 lines
13 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::SCHALE.Common.Crypto;
using global::Google.FlatBuffers;
public struct TranscendenceRecipeExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static TranscendenceRecipeExcel GetRootAsTranscendenceRecipeExcel(ByteBuffer _bb) { return GetRootAsTranscendenceRecipeExcel(_bb, new TranscendenceRecipeExcel()); }
public static TranscendenceRecipeExcel GetRootAsTranscendenceRecipeExcel(ByteBuffer _bb, TranscendenceRecipeExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public TranscendenceRecipeExcel __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 DevName { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetDevNameBytes() { return __p.__vector_as_span<byte>(6, 1); }
#else
public ArraySegment<byte>? GetDevNameBytes() { return __p.__vector_as_arraysegment(6); }
#endif
public byte[] GetDevNameArray() { return __p.__vector_as_array<byte>(6); }
public SCHALE.Common.FlatData.CurrencyTypes CostCurrencyType { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.CurrencyTypes)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.CurrencyTypes.Invalid; } }
public long CostCurrencyAmount { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public SCHALE.Common.FlatData.ParcelType ParcelType_(int j) { int o = __p.__offset(12); return o != 0 ? (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.ParcelType)0; }
public int ParcelType_Length { get { int o = __p.__offset(12); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span<SCHALE.Common.FlatData.ParcelType> GetParcelType_Bytes() { return __p.__vector_as_span<SCHALE.Common.FlatData.ParcelType>(12, 4); }
#else
public ArraySegment<byte>? GetParcelType_Bytes() { return __p.__vector_as_arraysegment(12); }
#endif
public SCHALE.Common.FlatData.ParcelType[] GetParcelType_Array() { int o = __p.__offset(12); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.ParcelType[] a = new SCHALE.Common.FlatData.ParcelType[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(p + i * 4); } return a; }
public long ParcelId(int j) { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
public int ParcelIdLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span<long> GetParcelIdBytes() { return __p.__vector_as_span<long>(14, 8); }
#else
public ArraySegment<byte>? GetParcelIdBytes() { return __p.__vector_as_arraysegment(14); }
#endif
public long[] GetParcelIdArray() { return __p.__vector_as_array<long>(14); }
public int ParcelAmount(int j) { int o = __p.__offset(16); return o != 0 ? __p.bb.GetInt(__p.__vector(o) + j * 4) : (int)0; }
public int ParcelAmountLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span<int> GetParcelAmountBytes() { return __p.__vector_as_span<int>(16, 4); }
#else
public ArraySegment<byte>? GetParcelAmountBytes() { return __p.__vector_as_arraysegment(16); }
#endif
public int[] GetParcelAmountArray() { return __p.__vector_as_array<int>(16); }
public static Offset<SCHALE.Common.FlatData.TranscendenceRecipeExcel> CreateTranscendenceRecipeExcel(FlatBufferBuilder builder,
long Id = 0,
StringOffset DevNameOffset = default(StringOffset),
SCHALE.Common.FlatData.CurrencyTypes CostCurrencyType = SCHALE.Common.FlatData.CurrencyTypes.Invalid,
long CostCurrencyAmount = 0,
VectorOffset ParcelType_Offset = default(VectorOffset),
VectorOffset ParcelIdOffset = default(VectorOffset),
VectorOffset ParcelAmountOffset = default(VectorOffset)) {
builder.StartTable(7);
TranscendenceRecipeExcel.AddCostCurrencyAmount(builder, CostCurrencyAmount);
TranscendenceRecipeExcel.AddId(builder, Id);
TranscendenceRecipeExcel.AddParcelAmount(builder, ParcelAmountOffset);
TranscendenceRecipeExcel.AddParcelId(builder, ParcelIdOffset);
TranscendenceRecipeExcel.AddParcelType_(builder, ParcelType_Offset);
TranscendenceRecipeExcel.AddCostCurrencyType(builder, CostCurrencyType);
TranscendenceRecipeExcel.AddDevName(builder, DevNameOffset);
return TranscendenceRecipeExcel.EndTranscendenceRecipeExcel(builder);
}
public static void StartTranscendenceRecipeExcel(FlatBufferBuilder builder) { builder.StartTable(7); }
public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); }
public static void AddDevName(FlatBufferBuilder builder, StringOffset devNameOffset) { builder.AddOffset(1, devNameOffset.Value, 0); }
public static void AddCostCurrencyType(FlatBufferBuilder builder, SCHALE.Common.FlatData.CurrencyTypes costCurrencyType) { builder.AddInt(2, (int)costCurrencyType, 0); }
public static void AddCostCurrencyAmount(FlatBufferBuilder builder, long costCurrencyAmount) { builder.AddLong(3, costCurrencyAmount, 0); }
public static void AddParcelType_(FlatBufferBuilder builder, VectorOffset parcelType_Offset) { builder.AddOffset(4, parcelType_Offset.Value, 0); }
public static VectorOffset CreateParcelType_Vector(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddInt((int)data[i]); return builder.EndVector(); }
public static VectorOffset CreateParcelType_VectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateParcelType_VectorBlock(FlatBufferBuilder builder, ArraySegment<SCHALE.Common.FlatData.ParcelType> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateParcelType_VectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<SCHALE.Common.FlatData.ParcelType>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartParcelType_Vector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static void AddParcelId(FlatBufferBuilder builder, VectorOffset parcelIdOffset) { builder.AddOffset(5, parcelIdOffset.Value, 0); }
public static VectorOffset CreateParcelIdVector(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 CreateParcelIdVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateParcelIdVectorBlock(FlatBufferBuilder builder, ArraySegment<long> data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateParcelIdVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<long>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartParcelIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
public static void AddParcelAmount(FlatBufferBuilder builder, VectorOffset parcelAmountOffset) { builder.AddOffset(6, parcelAmountOffset.Value, 0); }
public static VectorOffset CreateParcelAmountVector(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddInt(data[i]); return builder.EndVector(); }
public static VectorOffset CreateParcelAmountVectorBlock(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateParcelAmountVectorBlock(FlatBufferBuilder builder, ArraySegment<int> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateParcelAmountVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<int>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartParcelAmountVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static Offset<SCHALE.Common.FlatData.TranscendenceRecipeExcel> EndTranscendenceRecipeExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.TranscendenceRecipeExcel>(o);
}
public TranscendenceRecipeExcelT UnPack() {
var _o = new TranscendenceRecipeExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(TranscendenceRecipeExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("TranscendenceRecipe");
_o.Id = TableEncryptionService.Convert(this.Id, key);
_o.DevName = TableEncryptionService.Convert(this.DevName, key);
_o.CostCurrencyType = TableEncryptionService.Convert(this.CostCurrencyType, key);
_o.CostCurrencyAmount = TableEncryptionService.Convert(this.CostCurrencyAmount, key);
_o.ParcelType_ = new List<SCHALE.Common.FlatData.ParcelType>();
for (var _j = 0; _j < this.ParcelType_Length; ++_j) {_o.ParcelType_.Add(TableEncryptionService.Convert(this.ParcelType_(_j), key));}
_o.ParcelId = new List<long>();
for (var _j = 0; _j < this.ParcelIdLength; ++_j) {_o.ParcelId.Add(TableEncryptionService.Convert(this.ParcelId(_j), key));}
_o.ParcelAmount = new List<int>();
for (var _j = 0; _j < this.ParcelAmountLength; ++_j) {_o.ParcelAmount.Add(TableEncryptionService.Convert(this.ParcelAmount(_j), key));}
}
public static Offset<SCHALE.Common.FlatData.TranscendenceRecipeExcel> Pack(FlatBufferBuilder builder, TranscendenceRecipeExcelT _o) {
if (_o == null) return default(Offset<SCHALE.Common.FlatData.TranscendenceRecipeExcel>);
var _DevName = _o.DevName == null ? default(StringOffset) : builder.CreateString(_o.DevName);
var _ParcelType_ = default(VectorOffset);
if (_o.ParcelType_ != null) {
var __ParcelType_ = _o.ParcelType_.ToArray();
_ParcelType_ = CreateParcelType_Vector(builder, __ParcelType_);
}
var _ParcelId = default(VectorOffset);
if (_o.ParcelId != null) {
var __ParcelId = _o.ParcelId.ToArray();
_ParcelId = CreateParcelIdVector(builder, __ParcelId);
}
var _ParcelAmount = default(VectorOffset);
if (_o.ParcelAmount != null) {
var __ParcelAmount = _o.ParcelAmount.ToArray();
_ParcelAmount = CreateParcelAmountVector(builder, __ParcelAmount);
}
return CreateTranscendenceRecipeExcel(
builder,
_o.Id,
_DevName,
_o.CostCurrencyType,
_o.CostCurrencyAmount,
_ParcelType_,
_ParcelId,
_ParcelAmount);
}
}
public class TranscendenceRecipeExcelT
{
public long Id { get; set; }
public string DevName { get; set; }
public SCHALE.Common.FlatData.CurrencyTypes CostCurrencyType { get; set; }
public long CostCurrencyAmount { get; set; }
public List<SCHALE.Common.FlatData.ParcelType> ParcelType_ { get; set; }
public List<long> ParcelId { get; set; }
public List<int> ParcelAmount { get; set; }
public TranscendenceRecipeExcelT() {
this.Id = 0;
this.DevName = null;
this.CostCurrencyType = SCHALE.Common.FlatData.CurrencyTypes.Invalid;
this.CostCurrencyAmount = 0;
this.ParcelType_ = null;
this.ParcelId = null;
this.ParcelAmount = null;
}
}
static public class TranscendenceRecipeExcelVerify
{
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 /*DevName*/, false)
&& verifier.VerifyField(tablePos, 8 /*CostCurrencyType*/, 4 /*SCHALE.Common.FlatData.CurrencyTypes*/, 4, false)
&& verifier.VerifyField(tablePos, 10 /*CostCurrencyAmount*/, 8 /*long*/, 8, false)
&& verifier.VerifyVectorOfData(tablePos, 12 /*ParcelType_*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, false)
&& verifier.VerifyVectorOfData(tablePos, 14 /*ParcelId*/, 8 /*long*/, false)
&& verifier.VerifyVectorOfData(tablePos, 16 /*ParcelAmount*/, 4 /*int*/, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}