// // automatically generated by the FlatBuffers compiler, do not modify // namespace SCHALE.Common.FlatData { using global::System; using global::System.Collections.Generic; using global::Google.FlatBuffers; public struct FurnitureGroupExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static FurnitureGroupExcel GetRootAsFurnitureGroupExcel(ByteBuffer _bb) { return GetRootAsFurnitureGroupExcel(_bb, new FurnitureGroupExcel()); } public static FurnitureGroupExcel GetRootAsFurnitureGroupExcel(ByteBuffer _bb, FurnitureGroupExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public FurnitureGroupExcel __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 uint GroupNameLocalize { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } public uint LocalizeEtcId { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } public int RequiredFurnitureCount(int j) { int o = __p.__offset(10); return o != 0 ? __p.bb.GetInt(__p.__vector(o) + j * 4) : (int)0; } public int RequiredFurnitureCountLength { get { int o = __p.__offset(10); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetRequiredFurnitureCountBytes() { return __p.__vector_as_span(10, 4); } #else public ArraySegment? GetRequiredFurnitureCountBytes() { return __p.__vector_as_arraysegment(10); } #endif public int[] GetRequiredFurnitureCountArray() { return __p.__vector_as_array(10); } public long ComfortBonus(int j) { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int ComfortBonusLength { get { int o = __p.__offset(12); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetComfortBonusBytes() { return __p.__vector_as_span(12, 8); } #else public ArraySegment? GetComfortBonusBytes() { return __p.__vector_as_arraysegment(12); } #endif public long[] GetComfortBonusArray() { return __p.__vector_as_array(12); } public static Offset CreateFurnitureGroupExcel(FlatBufferBuilder builder, long Id = 0, uint GroupNameLocalize = 0, uint LocalizeEtcId = 0, VectorOffset RequiredFurnitureCountOffset = default(VectorOffset), VectorOffset ComfortBonusOffset = default(VectorOffset)) { builder.StartTable(5); FurnitureGroupExcel.AddId(builder, Id); FurnitureGroupExcel.AddComfortBonus(builder, ComfortBonusOffset); FurnitureGroupExcel.AddRequiredFurnitureCount(builder, RequiredFurnitureCountOffset); FurnitureGroupExcel.AddLocalizeEtcId(builder, LocalizeEtcId); FurnitureGroupExcel.AddGroupNameLocalize(builder, GroupNameLocalize); return FurnitureGroupExcel.EndFurnitureGroupExcel(builder); } public static void StartFurnitureGroupExcel(FlatBufferBuilder builder) { builder.StartTable(5); } public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); } public static void AddGroupNameLocalize(FlatBufferBuilder builder, uint groupNameLocalize) { builder.AddUint(1, groupNameLocalize, 0); } public static void AddLocalizeEtcId(FlatBufferBuilder builder, uint localizeEtcId) { builder.AddUint(2, localizeEtcId, 0); } public static void AddRequiredFurnitureCount(FlatBufferBuilder builder, VectorOffset requiredFurnitureCountOffset) { builder.AddOffset(3, requiredFurnitureCountOffset.Value, 0); } public static VectorOffset CreateRequiredFurnitureCountVector(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 CreateRequiredFurnitureCountVectorBlock(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateRequiredFurnitureCountVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateRequiredFurnitureCountVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartRequiredFurnitureCountVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddComfortBonus(FlatBufferBuilder builder, VectorOffset comfortBonusOffset) { builder.AddOffset(4, comfortBonusOffset.Value, 0); } public static VectorOffset CreateComfortBonusVector(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 CreateComfortBonusVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateComfortBonusVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateComfortBonusVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartComfortBonusVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static Offset EndFurnitureGroupExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } } static public class FurnitureGroupExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*Id*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 6 /*GroupNameLocalize*/, 4 /*uint*/, 4, false) && verifier.VerifyField(tablePos, 8 /*LocalizeEtcId*/, 4 /*uint*/, 4, false) && verifier.VerifyVectorOfData(tablePos, 10 /*RequiredFurnitureCount*/, 4 /*int*/, false) && verifier.VerifyVectorOfData(tablePos, 12 /*ComfortBonus*/, 8 /*long*/, false) && verifier.VerifyTableEnd(tablePos); } } }