forked from Raphael/SCHALE.GameServer
144 lines
12 KiB
C#
144 lines
12 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 ProductExcel : IFlatbufferObject
|
|
{
|
|
private Table __p;
|
|
public ByteBuffer ByteBuffer { get { return __p.bb; } }
|
|
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
|
|
public static ProductExcel GetRootAsProductExcel(ByteBuffer _bb) { return GetRootAsProductExcel(_bb, new ProductExcel()); }
|
|
public static ProductExcel GetRootAsProductExcel(ByteBuffer _bb, ProductExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
|
|
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
|
|
public ProductExcel __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 ProductId { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
|
|
#if ENABLE_SPAN_T
|
|
public Span<byte> GetProductIdBytes() { return __p.__vector_as_span<byte>(6, 1); }
|
|
#else
|
|
public ArraySegment<byte>? GetProductIdBytes() { return __p.__vector_as_arraysegment(6); }
|
|
#endif
|
|
public byte[] GetProductIdArray() { return __p.__vector_as_array<byte>(6); }
|
|
public SCHALE.Common.FlatData.StoreType StoreType { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.StoreType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.StoreType.None; } }
|
|
public long Price { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
|
|
public string PriceReference { get { int o = __p.__offset(12); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
|
|
#if ENABLE_SPAN_T
|
|
public Span<byte> GetPriceReferenceBytes() { return __p.__vector_as_span<byte>(12, 1); }
|
|
#else
|
|
public ArraySegment<byte>? GetPriceReferenceBytes() { return __p.__vector_as_arraysegment(12); }
|
|
#endif
|
|
public byte[] GetPriceReferenceArray() { return __p.__vector_as_array<byte>(12); }
|
|
public SCHALE.Common.FlatData.PurchasePeriodType PurchasePeriodType { get { int o = __p.__offset(14); return o != 0 ? (SCHALE.Common.FlatData.PurchasePeriodType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.PurchasePeriodType.None; } }
|
|
public long PurchasePeriodLimit { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
|
|
public SCHALE.Common.FlatData.ParcelType ParcelType_(int j) { int o = __p.__offset(18); 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(18); 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>(18, 4); }
|
|
#else
|
|
public ArraySegment<byte>? GetParcelType_Bytes() { return __p.__vector_as_arraysegment(18); }
|
|
#endif
|
|
public SCHALE.Common.FlatData.ParcelType[] GetParcelType_Array() { int o = __p.__offset(18); 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(20); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
|
|
public int ParcelIdLength { get { int o = __p.__offset(20); return o != 0 ? __p.__vector_len(o) : 0; } }
|
|
#if ENABLE_SPAN_T
|
|
public Span<long> GetParcelIdBytes() { return __p.__vector_as_span<long>(20, 8); }
|
|
#else
|
|
public ArraySegment<byte>? GetParcelIdBytes() { return __p.__vector_as_arraysegment(20); }
|
|
#endif
|
|
public long[] GetParcelIdArray() { return __p.__vector_as_array<long>(20); }
|
|
public long ParcelAmount(int j) { int o = __p.__offset(22); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
|
|
public int ParcelAmountLength { get { int o = __p.__offset(22); return o != 0 ? __p.__vector_len(o) : 0; } }
|
|
#if ENABLE_SPAN_T
|
|
public Span<long> GetParcelAmountBytes() { return __p.__vector_as_span<long>(22, 8); }
|
|
#else
|
|
public ArraySegment<byte>? GetParcelAmountBytes() { return __p.__vector_as_arraysegment(22); }
|
|
#endif
|
|
public long[] GetParcelAmountArray() { return __p.__vector_as_array<long>(22); }
|
|
|
|
public static Offset<SCHALE.Common.FlatData.ProductExcel> CreateProductExcel(FlatBufferBuilder builder,
|
|
long Id = 0,
|
|
StringOffset ProductIdOffset = default(StringOffset),
|
|
SCHALE.Common.FlatData.StoreType StoreType = SCHALE.Common.FlatData.StoreType.None,
|
|
long Price = 0,
|
|
StringOffset PriceReferenceOffset = default(StringOffset),
|
|
SCHALE.Common.FlatData.PurchasePeriodType PurchasePeriodType = SCHALE.Common.FlatData.PurchasePeriodType.None,
|
|
long PurchasePeriodLimit = 0,
|
|
VectorOffset ParcelType_Offset = default(VectorOffset),
|
|
VectorOffset ParcelIdOffset = default(VectorOffset),
|
|
VectorOffset ParcelAmountOffset = default(VectorOffset)) {
|
|
builder.StartTable(10);
|
|
ProductExcel.AddPurchasePeriodLimit(builder, PurchasePeriodLimit);
|
|
ProductExcel.AddPrice(builder, Price);
|
|
ProductExcel.AddId(builder, Id);
|
|
ProductExcel.AddParcelAmount(builder, ParcelAmountOffset);
|
|
ProductExcel.AddParcelId(builder, ParcelIdOffset);
|
|
ProductExcel.AddParcelType_(builder, ParcelType_Offset);
|
|
ProductExcel.AddPurchasePeriodType(builder, PurchasePeriodType);
|
|
ProductExcel.AddPriceReference(builder, PriceReferenceOffset);
|
|
ProductExcel.AddStoreType(builder, StoreType);
|
|
ProductExcel.AddProductId(builder, ProductIdOffset);
|
|
return ProductExcel.EndProductExcel(builder);
|
|
}
|
|
|
|
public static void StartProductExcel(FlatBufferBuilder builder) { builder.StartTable(10); }
|
|
public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); }
|
|
public static void AddProductId(FlatBufferBuilder builder, StringOffset productIdOffset) { builder.AddOffset(1, productIdOffset.Value, 0); }
|
|
public static void AddStoreType(FlatBufferBuilder builder, SCHALE.Common.FlatData.StoreType storeType) { builder.AddInt(2, (int)storeType, 0); }
|
|
public static void AddPrice(FlatBufferBuilder builder, long price) { builder.AddLong(3, price, 0); }
|
|
public static void AddPriceReference(FlatBufferBuilder builder, StringOffset priceReferenceOffset) { builder.AddOffset(4, priceReferenceOffset.Value, 0); }
|
|
public static void AddPurchasePeriodType(FlatBufferBuilder builder, SCHALE.Common.FlatData.PurchasePeriodType purchasePeriodType) { builder.AddInt(5, (int)purchasePeriodType, 0); }
|
|
public static void AddPurchasePeriodLimit(FlatBufferBuilder builder, long purchasePeriodLimit) { builder.AddLong(6, purchasePeriodLimit, 0); }
|
|
public static void AddParcelType_(FlatBufferBuilder builder, VectorOffset parcelType_Offset) { builder.AddOffset(7, 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(8, 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(9, parcelAmountOffset.Value, 0); }
|
|
public static VectorOffset CreateParcelAmountVector(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 CreateParcelAmountVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
|
|
public static VectorOffset CreateParcelAmountVectorBlock(FlatBufferBuilder builder, ArraySegment<long> data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
|
|
public static VectorOffset CreateParcelAmountVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<long>(dataPtr, sizeInBytes); return builder.EndVector(); }
|
|
public static void StartParcelAmountVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
|
|
public static Offset<SCHALE.Common.FlatData.ProductExcel> EndProductExcel(FlatBufferBuilder builder) {
|
|
int o = builder.EndTable();
|
|
return new Offset<SCHALE.Common.FlatData.ProductExcel>(o);
|
|
}
|
|
}
|
|
|
|
|
|
static public class ProductExcelVerify
|
|
{
|
|
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 /*ProductId*/, false)
|
|
&& verifier.VerifyField(tablePos, 8 /*StoreType*/, 4 /*SCHALE.Common.FlatData.StoreType*/, 4, false)
|
|
&& verifier.VerifyField(tablePos, 10 /*Price*/, 8 /*long*/, 8, false)
|
|
&& verifier.VerifyString(tablePos, 12 /*PriceReference*/, false)
|
|
&& verifier.VerifyField(tablePos, 14 /*PurchasePeriodType*/, 4 /*SCHALE.Common.FlatData.PurchasePeriodType*/, 4, false)
|
|
&& verifier.VerifyField(tablePos, 16 /*PurchasePeriodLimit*/, 8 /*long*/, 8, false)
|
|
&& verifier.VerifyVectorOfData(tablePos, 18 /*ParcelType_*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, false)
|
|
&& verifier.VerifyVectorOfData(tablePos, 20 /*ParcelId*/, 8 /*long*/, false)
|
|
&& verifier.VerifyVectorOfData(tablePos, 22 /*ParcelAmount*/, 8 /*long*/, false)
|
|
&& verifier.VerifyTableEnd(tablePos);
|
|
}
|
|
}
|
|
|
|
}
|