SCHALE.GameServer/SCHALE.Common/FlatData/SystemMailExcel.cs

78 lines
4.0 KiB
C#
Raw Normal View History

2024-04-21 00:21:57 +00:00
// <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 SystemMailExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static SystemMailExcel GetRootAsSystemMailExcel(ByteBuffer _bb) { return GetRootAsSystemMailExcel(_bb, new SystemMailExcel()); }
public static SystemMailExcel GetRootAsSystemMailExcel(ByteBuffer _bb, SystemMailExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public SystemMailExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public SCHALE.Common.FlatData.MailType MailType { get { int o = __p.__offset(4); return o != 0 ? (SCHALE.Common.FlatData.MailType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.MailType.System; } }
public long ExpiredDay { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public string Sender { get { int o = __p.__offset(8); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetSenderBytes() { return __p.__vector_as_span<byte>(8, 1); }
#else
public ArraySegment<byte>? GetSenderBytes() { return __p.__vector_as_arraysegment(8); }
#endif
public byte[] GetSenderArray() { return __p.__vector_as_array<byte>(8); }
public string Comment { get { int o = __p.__offset(10); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetCommentBytes() { return __p.__vector_as_span<byte>(10, 1); }
#else
public ArraySegment<byte>? GetCommentBytes() { return __p.__vector_as_arraysegment(10); }
#endif
public byte[] GetCommentArray() { return __p.__vector_as_array<byte>(10); }
public static Offset<SCHALE.Common.FlatData.SystemMailExcel> CreateSystemMailExcel(FlatBufferBuilder builder,
SCHALE.Common.FlatData.MailType MailType = SCHALE.Common.FlatData.MailType.System,
long ExpiredDay = 0,
StringOffset SenderOffset = default(StringOffset),
StringOffset CommentOffset = default(StringOffset)) {
builder.StartTable(4);
SystemMailExcel.AddExpiredDay(builder, ExpiredDay);
SystemMailExcel.AddComment(builder, CommentOffset);
SystemMailExcel.AddSender(builder, SenderOffset);
SystemMailExcel.AddMailType(builder, MailType);
return SystemMailExcel.EndSystemMailExcel(builder);
}
public static void StartSystemMailExcel(FlatBufferBuilder builder) { builder.StartTable(4); }
public static void AddMailType(FlatBufferBuilder builder, SCHALE.Common.FlatData.MailType mailType) { builder.AddInt(0, (int)mailType, 0); }
public static void AddExpiredDay(FlatBufferBuilder builder, long expiredDay) { builder.AddLong(1, expiredDay, 0); }
public static void AddSender(FlatBufferBuilder builder, StringOffset senderOffset) { builder.AddOffset(2, senderOffset.Value, 0); }
public static void AddComment(FlatBufferBuilder builder, StringOffset commentOffset) { builder.AddOffset(3, commentOffset.Value, 0); }
public static Offset<SCHALE.Common.FlatData.SystemMailExcel> EndSystemMailExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.SystemMailExcel>(o);
}
}
static public class SystemMailExcelVerify
{
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
{
return verifier.VerifyTableStart(tablePos)
&& verifier.VerifyField(tablePos, 4 /*MailType*/, 4 /*SCHALE.Common.FlatData.MailType*/, 4, false)
&& verifier.VerifyField(tablePos, 6 /*ExpiredDay*/, 8 /*long*/, 8, false)
&& verifier.VerifyString(tablePos, 8 /*Sender*/, false)
&& verifier.VerifyString(tablePos, 10 /*Comment*/, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}