blob: 3f1f2f01dc35122f04eff012e8ac0752e08b615e [file] [log] [blame]
Austin Schuhe89fa2d2019-08-14 20:24:23 -07001// <auto-generated>
2// automatically generated by the FlatBuffers compiler, do not modify
3// </auto-generated>
4
5namespace MyGame.Example
6{
7
8using global::System;
9using global::FlatBuffers;
10
11public struct NestedStruct : IFlatbufferObject
12{
13 private Struct __p;
14 public ByteBuffer ByteBuffer { get { return __p.bb; } }
15 public void __init(int _i, ByteBuffer _bb) { __p = new Struct(_i, _bb); }
16 public NestedStruct __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
17
18 public int A(int j) { return __p.bb.GetInt(__p.bb_pos + 0 + j * 4); }
19 public void MutateA(int j, int a) { __p.bb.PutInt(__p.bb_pos + 0 + j * 4, a); }
20 public MyGame.Example.TestEnum B { get { return (MyGame.Example.TestEnum)__p.bb.GetSbyte(__p.bb_pos + 8); } }
21 public void MutateB(MyGame.Example.TestEnum b) { __p.bb.PutSbyte(__p.bb_pos + 8, (sbyte)b); }
22 public MyGame.Example.TestEnum C(int j) { return (MyGame.Example.TestEnum)__p.bb.GetSbyte(__p.bb_pos + 9 + j * 1); }
23 public void MutateC(int j, MyGame.Example.TestEnum c) { __p.bb.PutSbyte(__p.bb_pos + 9 + j * 1, (sbyte)c); }
24
25 public static Offset<MyGame.Example.NestedStruct> CreateNestedStruct(FlatBufferBuilder builder, int[] A, MyGame.Example.TestEnum B, MyGame.Example.TestEnum[] C) {
26 builder.Prep(4, 12);
27 builder.Pad(1);
28 for (int _idx0 = 2; _idx0 > 0; _idx0--) {
29 builder.PutSbyte((sbyte)C[_idx0-1]);
30 }
31 builder.PutSbyte((sbyte)B);
32 for (int _idx0 = 2; _idx0 > 0; _idx0--) {
33 builder.PutInt(A[_idx0-1]);
34 }
35 return new Offset<MyGame.Example.NestedStruct>(builder.Offset);
36 }
37};
38
39
40}