SCHALE.GameServer/SCHALE.Common/FlatData/RecipeCraftExcel.cs

256 lines
19 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 RecipeCraftExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static RecipeCraftExcel GetRootAsRecipeCraftExcel(ByteBuffer _bb) { return GetRootAsRecipeCraftExcel(_bb, new RecipeCraftExcel()); }
public static RecipeCraftExcel GetRootAsRecipeCraftExcel(ByteBuffer _bb, RecipeCraftExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public RecipeCraftExcel __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.RecipeType RecipeType_ { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.RecipeType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.RecipeType.None_; } }
public long RecipeIngredientId { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public string RecipeIngredientDevName { get { int o = __p.__offset(12); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetRecipeIngredientDevNameBytes() { return __p.__vector_as_span<byte>(12, 1); }
#else
public ArraySegment<byte>? GetRecipeIngredientDevNameBytes() { return __p.__vector_as_arraysegment(12); }
#endif
public byte[] GetRecipeIngredientDevNameArray() { return __p.__vector_as_array<byte>(12); }
public SCHALE.Common.FlatData.ParcelType ParcelType_(int j) { int o = __p.__offset(14); 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(14); 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>(14, 4); }
#else
public ArraySegment<byte>? GetParcelType_Bytes() { return __p.__vector_as_arraysegment(14); }
#endif
public SCHALE.Common.FlatData.ParcelType[] GetParcelType_Array() { int o = __p.__offset(14); 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(16); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
public int ParcelIdLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span<long> GetParcelIdBytes() { return __p.__vector_as_span<long>(16, 8); }
#else
public ArraySegment<byte>? GetParcelIdBytes() { return __p.__vector_as_arraysegment(16); }
#endif
public long[] GetParcelIdArray() { return __p.__vector_as_array<long>(16); }
public string ParcelDevName(int j) { int o = __p.__offset(18); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; }
public int ParcelDevNameLength { get { int o = __p.__offset(18); return o != 0 ? __p.__vector_len(o) : 0; } }
public long ResultAmountMin(int j) { int o = __p.__offset(20); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
public int ResultAmountMinLength { get { int o = __p.__offset(20); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span<long> GetResultAmountMinBytes() { return __p.__vector_as_span<long>(20, 8); }
#else
public ArraySegment<byte>? GetResultAmountMinBytes() { return __p.__vector_as_arraysegment(20); }
#endif
public long[] GetResultAmountMinArray() { return __p.__vector_as_array<long>(20); }
public long ResultAmountMax(int j) { int o = __p.__offset(22); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
public int ResultAmountMaxLength { get { int o = __p.__offset(22); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span<long> GetResultAmountMaxBytes() { return __p.__vector_as_span<long>(22, 8); }
#else
public ArraySegment<byte>? GetResultAmountMaxBytes() { return __p.__vector_as_arraysegment(22); }
#endif
public long[] GetResultAmountMaxArray() { return __p.__vector_as_array<long>(22); }
public static Offset<SCHALE.Common.FlatData.RecipeCraftExcel> CreateRecipeCraftExcel(FlatBufferBuilder builder,
long Id = 0,
StringOffset DevNameOffset = default(StringOffset),
SCHALE.Common.FlatData.RecipeType RecipeType_ = SCHALE.Common.FlatData.RecipeType.None_,
long RecipeIngredientId = 0,
StringOffset RecipeIngredientDevNameOffset = default(StringOffset),
VectorOffset ParcelType_Offset = default(VectorOffset),
VectorOffset ParcelIdOffset = default(VectorOffset),
VectorOffset ParcelDevNameOffset = default(VectorOffset),
VectorOffset ResultAmountMinOffset = default(VectorOffset),
VectorOffset ResultAmountMaxOffset = default(VectorOffset)) {
builder.StartTable(10);
RecipeCraftExcel.AddRecipeIngredientId(builder, RecipeIngredientId);
RecipeCraftExcel.AddId(builder, Id);
RecipeCraftExcel.AddResultAmountMax(builder, ResultAmountMaxOffset);
RecipeCraftExcel.AddResultAmountMin(builder, ResultAmountMinOffset);
RecipeCraftExcel.AddParcelDevName(builder, ParcelDevNameOffset);
RecipeCraftExcel.AddParcelId(builder, ParcelIdOffset);
RecipeCraftExcel.AddParcelType_(builder, ParcelType_Offset);
RecipeCraftExcel.AddRecipeIngredientDevName(builder, RecipeIngredientDevNameOffset);
RecipeCraftExcel.AddRecipeType_(builder, RecipeType_);
RecipeCraftExcel.AddDevName(builder, DevNameOffset);
return RecipeCraftExcel.EndRecipeCraftExcel(builder);
}
public static void StartRecipeCraftExcel(FlatBufferBuilder builder) { builder.StartTable(10); }
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 AddRecipeType_(FlatBufferBuilder builder, SCHALE.Common.FlatData.RecipeType recipeType_) { builder.AddInt(2, (int)recipeType_, 0); }
public static void AddRecipeIngredientId(FlatBufferBuilder builder, long recipeIngredientId) { builder.AddLong(3, recipeIngredientId, 0); }
public static void AddRecipeIngredientDevName(FlatBufferBuilder builder, StringOffset recipeIngredientDevNameOffset) { builder.AddOffset(4, recipeIngredientDevNameOffset.Value, 0); }
public static void AddParcelType_(FlatBufferBuilder builder, VectorOffset parcelType_Offset) { builder.AddOffset(5, 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(6, 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 AddParcelDevName(FlatBufferBuilder builder, VectorOffset parcelDevNameOffset) { builder.AddOffset(7, parcelDevNameOffset.Value, 0); }
public static VectorOffset CreateParcelDevNameVector(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 CreateParcelDevNameVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateParcelDevNameVectorBlock(FlatBufferBuilder builder, ArraySegment<StringOffset> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateParcelDevNameVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<StringOffset>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartParcelDevNameVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static void AddResultAmountMin(FlatBufferBuilder builder, VectorOffset resultAmountMinOffset) { builder.AddOffset(8, resultAmountMinOffset.Value, 0); }
public static VectorOffset CreateResultAmountMinVector(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 CreateResultAmountMinVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateResultAmountMinVectorBlock(FlatBufferBuilder builder, ArraySegment<long> data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateResultAmountMinVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<long>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartResultAmountMinVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
public static void AddResultAmountMax(FlatBufferBuilder builder, VectorOffset resultAmountMaxOffset) { builder.AddOffset(9, resultAmountMaxOffset.Value, 0); }
public static VectorOffset CreateResultAmountMaxVector(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 CreateResultAmountMaxVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateResultAmountMaxVectorBlock(FlatBufferBuilder builder, ArraySegment<long> data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateResultAmountMaxVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<long>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartResultAmountMaxVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
public static Offset<SCHALE.Common.FlatData.RecipeCraftExcel> EndRecipeCraftExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.RecipeCraftExcel>(o);
}
public RecipeCraftExcelT UnPack() {
var _o = new RecipeCraftExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(RecipeCraftExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("RecipeCraft");
_o.Id = TableEncryptionService.Convert(this.Id, key);
_o.DevName = TableEncryptionService.Convert(this.DevName, key);
_o.RecipeType_ = TableEncryptionService.Convert(this.RecipeType_, key);
_o.RecipeIngredientId = TableEncryptionService.Convert(this.RecipeIngredientId, key);
_o.RecipeIngredientDevName = TableEncryptionService.Convert(this.RecipeIngredientDevName, 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.ParcelDevName = new List<string>();
for (var _j = 0; _j < this.ParcelDevNameLength; ++_j) {_o.ParcelDevName.Add(TableEncryptionService.Convert(this.ParcelDevName(_j), key));}
_o.ResultAmountMin = new List<long>();
for (var _j = 0; _j < this.ResultAmountMinLength; ++_j) {_o.ResultAmountMin.Add(TableEncryptionService.Convert(this.ResultAmountMin(_j), key));}
_o.ResultAmountMax = new List<long>();
for (var _j = 0; _j < this.ResultAmountMaxLength; ++_j) {_o.ResultAmountMax.Add(TableEncryptionService.Convert(this.ResultAmountMax(_j), key));}
}
public static Offset<SCHALE.Common.FlatData.RecipeCraftExcel> Pack(FlatBufferBuilder builder, RecipeCraftExcelT _o) {
if (_o == null) return default(Offset<SCHALE.Common.FlatData.RecipeCraftExcel>);
var _DevName = _o.DevName == null ? default(StringOffset) : builder.CreateString(_o.DevName);
var _RecipeIngredientDevName = _o.RecipeIngredientDevName == null ? default(StringOffset) : builder.CreateString(_o.RecipeIngredientDevName);
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 _ParcelDevName = default(VectorOffset);
if (_o.ParcelDevName != null) {
var __ParcelDevName = new StringOffset[_o.ParcelDevName.Count];
for (var _j = 0; _j < __ParcelDevName.Length; ++_j) { __ParcelDevName[_j] = builder.CreateString(_o.ParcelDevName[_j]); }
_ParcelDevName = CreateParcelDevNameVector(builder, __ParcelDevName);
}
var _ResultAmountMin = default(VectorOffset);
if (_o.ResultAmountMin != null) {
var __ResultAmountMin = _o.ResultAmountMin.ToArray();
_ResultAmountMin = CreateResultAmountMinVector(builder, __ResultAmountMin);
}
var _ResultAmountMax = default(VectorOffset);
if (_o.ResultAmountMax != null) {
var __ResultAmountMax = _o.ResultAmountMax.ToArray();
_ResultAmountMax = CreateResultAmountMaxVector(builder, __ResultAmountMax);
}
return CreateRecipeCraftExcel(
builder,
_o.Id,
_DevName,
_o.RecipeType_,
_o.RecipeIngredientId,
_RecipeIngredientDevName,
_ParcelType_,
_ParcelId,
_ParcelDevName,
_ResultAmountMin,
_ResultAmountMax);
}
}
public class RecipeCraftExcelT
{
public long Id { get; set; }
public string DevName { get; set; }
public SCHALE.Common.FlatData.RecipeType RecipeType_ { get; set; }
public long RecipeIngredientId { get; set; }
public string RecipeIngredientDevName { get; set; }
public List<SCHALE.Common.FlatData.ParcelType> ParcelType_ { get; set; }
public List<long> ParcelId { get; set; }
public List<string> ParcelDevName { get; set; }
public List<long> ResultAmountMin { get; set; }
public List<long> ResultAmountMax { get; set; }
public RecipeCraftExcelT() {
this.Id = 0;
this.DevName = null;
this.RecipeType_ = SCHALE.Common.FlatData.RecipeType.None_;
this.RecipeIngredientId = 0;
this.RecipeIngredientDevName = null;
this.ParcelType_ = null;
this.ParcelId = null;
this.ParcelDevName = null;
this.ResultAmountMin = null;
this.ResultAmountMax = null;
}
}
static public class RecipeCraftExcelVerify
{
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 /*RecipeType_*/, 4 /*SCHALE.Common.FlatData.RecipeType*/, 4, false)
&& verifier.VerifyField(tablePos, 10 /*RecipeIngredientId*/, 8 /*long*/, 8, false)
&& verifier.VerifyString(tablePos, 12 /*RecipeIngredientDevName*/, false)
&& verifier.VerifyVectorOfData(tablePos, 14 /*ParcelType_*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, false)
&& verifier.VerifyVectorOfData(tablePos, 16 /*ParcelId*/, 8 /*long*/, false)
&& verifier.VerifyVectorOfStrings(tablePos, 18 /*ParcelDevName*/, false)
&& verifier.VerifyVectorOfData(tablePos, 20 /*ResultAmountMin*/, 8 /*long*/, false)
&& verifier.VerifyVectorOfData(tablePos, 22 /*ResultAmountMax*/, 8 /*long*/, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}