// // automatically generated by the FlatBuffers compiler, do not modify // namespace SCHALE.Common.FlatData { using global::System; using global::System.Collections.Generic; using global::SCHALE.Common.Crypto; using global::Google.FlatBuffers; public struct Form : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static Form GetRootAsForm(ByteBuffer _bb) { return GetRootAsForm(_bb, new Form()); } public static Form GetRootAsForm(ByteBuffer _bb, Form obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public Form __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public SCHALE.Common.FlatData.MoveEnd? MoveEnd { get { int o = __p.__offset(4); return o != 0 ? (SCHALE.Common.FlatData.MoveEnd?)(new SCHALE.Common.FlatData.MoveEnd()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } } public SCHALE.Common.FlatData.Motion? PublicSkill { get { int o = __p.__offset(6); return o != 0 ? (SCHALE.Common.FlatData.Motion?)(new SCHALE.Common.FlatData.Motion()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } } public static Offset CreateForm(FlatBufferBuilder builder, Offset MoveEndOffset = default(Offset), Offset PublicSkillOffset = default(Offset)) { builder.StartTable(2); Form.AddPublicSkill(builder, PublicSkillOffset); Form.AddMoveEnd(builder, MoveEndOffset); return Form.EndForm(builder); } public static void StartForm(FlatBufferBuilder builder) { builder.StartTable(2); } public static void AddMoveEnd(FlatBufferBuilder builder, Offset moveEndOffset) { builder.AddOffset(0, moveEndOffset.Value, 0); } public static void AddPublicSkill(FlatBufferBuilder builder, Offset publicSkillOffset) { builder.AddOffset(1, publicSkillOffset.Value, 0); } public static Offset EndForm(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public FormT UnPack() { var _o = new FormT(); this.UnPackTo(_o); return _o; } public void UnPackTo(FormT _o) { byte[] key = { 0 }; _o.MoveEnd = this.MoveEnd.HasValue ? this.MoveEnd.Value.UnPack() : null; _o.PublicSkill = this.PublicSkill.HasValue ? this.PublicSkill.Value.UnPack() : null; } public static Offset Pack(FlatBufferBuilder builder, FormT _o) { if (_o == null) return default(Offset); var _MoveEnd = _o.MoveEnd == null ? default(Offset) : SCHALE.Common.FlatData.MoveEnd.Pack(builder, _o.MoveEnd); var _PublicSkill = _o.PublicSkill == null ? default(Offset) : SCHALE.Common.FlatData.Motion.Pack(builder, _o.PublicSkill); return CreateForm( builder, _MoveEnd, _PublicSkill); } } public class FormT { public SCHALE.Common.FlatData.MoveEndT MoveEnd { get; set; } public SCHALE.Common.FlatData.MotionT PublicSkill { get; set; } public FormT() { this.MoveEnd = null; this.PublicSkill = null; } } static public class FormVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyTable(tablePos, 4 /*MoveEnd*/, SCHALE.Common.FlatData.MoveEndVerify.Verify, false) && verifier.VerifyTable(tablePos, 6 /*PublicSkill*/, SCHALE.Common.FlatData.MotionVerify.Verify, false) && verifier.VerifyTableEnd(tablePos); } } }