Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame^] | 1 | // <auto-generated> |
| 2 | // automatically generated by the FlatBuffers compiler, do not modify |
| 3 | // </auto-generated> |
| 4 | |
| 5 | namespace MyGame.Example |
| 6 | { |
| 7 | |
| 8 | using global::System; |
| 9 | using global::FlatBuffers; |
| 10 | |
| 11 | internal partial struct TestSimpleTableWithEnum : IFlatbufferObject |
| 12 | { |
| 13 | private Table __p; |
| 14 | public ByteBuffer ByteBuffer { get { return __p.bb; } } |
| 15 | public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_1_11_1(); } |
| 16 | public static TestSimpleTableWithEnum GetRootAsTestSimpleTableWithEnum(ByteBuffer _bb) { return GetRootAsTestSimpleTableWithEnum(_bb, new TestSimpleTableWithEnum()); } |
| 17 | public static TestSimpleTableWithEnum GetRootAsTestSimpleTableWithEnum(ByteBuffer _bb, TestSimpleTableWithEnum obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } |
| 18 | public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } |
| 19 | public TestSimpleTableWithEnum __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } |
| 20 | |
| 21 | public MyGame.Example.Color Color { get { int o = __p.__offset(4); return o != 0 ? (MyGame.Example.Color)__p.bb.Get(o + __p.bb_pos) : MyGame.Example.Color.Green; } } |
| 22 | public bool MutateColor(MyGame.Example.Color color) { int o = __p.__offset(4); if (o != 0) { __p.bb.Put(o + __p.bb_pos, (byte)color); return true; } else { return false; } } |
| 23 | |
| 24 | public static Offset<MyGame.Example.TestSimpleTableWithEnum> CreateTestSimpleTableWithEnum(FlatBufferBuilder builder, |
| 25 | MyGame.Example.Color color = MyGame.Example.Color.Green) { |
| 26 | builder.StartTable(1); |
| 27 | TestSimpleTableWithEnum.AddColor(builder, color); |
| 28 | return TestSimpleTableWithEnum.EndTestSimpleTableWithEnum(builder); |
| 29 | } |
| 30 | |
| 31 | public static void StartTestSimpleTableWithEnum(FlatBufferBuilder builder) { builder.StartTable(1); } |
| 32 | public static void AddColor(FlatBufferBuilder builder, MyGame.Example.Color color) { builder.AddByte(0, (byte)color, 2); } |
| 33 | public static Offset<MyGame.Example.TestSimpleTableWithEnum> EndTestSimpleTableWithEnum(FlatBufferBuilder builder) { |
| 34 | int o = builder.EndTable(); |
| 35 | return new Offset<MyGame.Example.TestSimpleTableWithEnum>(o); |
| 36 | } |
| 37 | }; |
| 38 | |
| 39 | |
| 40 | } |