// // 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 ScenarioCharacterSituationSetExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static ScenarioCharacterSituationSetExcel GetRootAsScenarioCharacterSituationSetExcel(ByteBuffer _bb) { return GetRootAsScenarioCharacterSituationSetExcel(_bb, new ScenarioCharacterSituationSetExcel()); } public static ScenarioCharacterSituationSetExcel GetRootAsScenarioCharacterSituationSetExcel(ByteBuffer _bb, ScenarioCharacterSituationSetExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public ScenarioCharacterSituationSetExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public uint Name { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } public string Face { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetFaceBytes() { return __p.__vector_as_span(6, 1); } #else public ArraySegment? GetFaceBytes() { return __p.__vector_as_arraysegment(6); } #endif public byte[] GetFaceArray() { return __p.__vector_as_array(6); } public string Behavior { get { int o = __p.__offset(8); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetBehaviorBytes() { return __p.__vector_as_span(8, 1); } #else public ArraySegment? GetBehaviorBytes() { return __p.__vector_as_arraysegment(8); } #endif public byte[] GetBehaviorArray() { return __p.__vector_as_array(8); } public string Action { get { int o = __p.__offset(10); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetActionBytes() { return __p.__vector_as_span(10, 1); } #else public ArraySegment? GetActionBytes() { return __p.__vector_as_arraysegment(10); } #endif public byte[] GetActionArray() { return __p.__vector_as_array(10); } public string Shape { get { int o = __p.__offset(12); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetShapeBytes() { return __p.__vector_as_span(12, 1); } #else public ArraySegment? GetShapeBytes() { return __p.__vector_as_arraysegment(12); } #endif public byte[] GetShapeArray() { return __p.__vector_as_array(12); } public uint Effect { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } public uint Emotion { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } public static Offset CreateScenarioCharacterSituationSetExcel(FlatBufferBuilder builder, uint Name = 0, StringOffset FaceOffset = default(StringOffset), StringOffset BehaviorOffset = default(StringOffset), StringOffset ActionOffset = default(StringOffset), StringOffset ShapeOffset = default(StringOffset), uint Effect = 0, uint Emotion = 0) { builder.StartTable(7); ScenarioCharacterSituationSetExcel.AddEmotion(builder, Emotion); ScenarioCharacterSituationSetExcel.AddEffect(builder, Effect); ScenarioCharacterSituationSetExcel.AddShape(builder, ShapeOffset); ScenarioCharacterSituationSetExcel.AddAction(builder, ActionOffset); ScenarioCharacterSituationSetExcel.AddBehavior(builder, BehaviorOffset); ScenarioCharacterSituationSetExcel.AddFace(builder, FaceOffset); ScenarioCharacterSituationSetExcel.AddName(builder, Name); return ScenarioCharacterSituationSetExcel.EndScenarioCharacterSituationSetExcel(builder); } public static void StartScenarioCharacterSituationSetExcel(FlatBufferBuilder builder) { builder.StartTable(7); } public static void AddName(FlatBufferBuilder builder, uint name) { builder.AddUint(0, name, 0); } public static void AddFace(FlatBufferBuilder builder, StringOffset faceOffset) { builder.AddOffset(1, faceOffset.Value, 0); } public static void AddBehavior(FlatBufferBuilder builder, StringOffset behaviorOffset) { builder.AddOffset(2, behaviorOffset.Value, 0); } public static void AddAction(FlatBufferBuilder builder, StringOffset actionOffset) { builder.AddOffset(3, actionOffset.Value, 0); } public static void AddShape(FlatBufferBuilder builder, StringOffset shapeOffset) { builder.AddOffset(4, shapeOffset.Value, 0); } public static void AddEffect(FlatBufferBuilder builder, uint effect) { builder.AddUint(5, effect, 0); } public static void AddEmotion(FlatBufferBuilder builder, uint emotion) { builder.AddUint(6, emotion, 0); } public static Offset EndScenarioCharacterSituationSetExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } } static public class ScenarioCharacterSituationSetExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*Name*/, 4 /*uint*/, 4, false) && verifier.VerifyString(tablePos, 6 /*Face*/, false) && verifier.VerifyString(tablePos, 8 /*Behavior*/, false) && verifier.VerifyString(tablePos, 10 /*Action*/, false) && verifier.VerifyString(tablePos, 12 /*Shape*/, false) && verifier.VerifyField(tablePos, 14 /*Effect*/, 4 /*uint*/, 4, false) && verifier.VerifyField(tablePos, 16 /*Emotion*/, 4 /*uint*/, 4, false) && verifier.VerifyTableEnd(tablePos); } } }