//
// 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 MoveEnd_Offset = default(Offset),
Offset PublicSkillOffset = default(Offset)) {
builder.StartTable(2);
Form.AddPublicSkill(builder, PublicSkillOffset);
Form.AddMoveEnd_(builder, MoveEnd_Offset);
return Form.EndForm(builder);
}
public static void StartForm(FlatBufferBuilder builder) { builder.StartTable(2); }
public static void AddMoveEnd_(FlatBufferBuilder builder, Offset moveEnd_Offset) { builder.AddOffset(0, moveEnd_Offset.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);
}
}
}