blob: 28815e7363b776a96692d312236abe8385b3a7c9 [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 ArrayStruct : 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 ArrayStruct __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
17
18 public float A { get { return __p.bb.GetFloat(__p.bb_pos + 0); } }
19 public void MutateA(float a) { __p.bb.PutFloat(__p.bb_pos + 0, a); }
20 public int B(int j) { return __p.bb.GetInt(__p.bb_pos + 4 + j * 4); }
21 public void MutateB(int j, int b) { __p.bb.PutInt(__p.bb_pos + 4 + j * 4, b); }
22 public sbyte C { get { return __p.bb.GetSbyte(__p.bb_pos + 64); } }
23 public void MutateC(sbyte c) { __p.bb.PutSbyte(__p.bb_pos + 64, c); }
24 public MyGame.Example.NestedStruct D(int j) { return (new MyGame.Example.NestedStruct()).__assign(__p.bb_pos + 68 + j * 12, __p.bb); }
25
26 public static Offset<MyGame.Example.ArrayStruct> CreateArrayStruct(FlatBufferBuilder builder, float A, int[] B, sbyte C, int[,] d_A, MyGame.Example.TestEnum[] d_B, MyGame.Example.TestEnum[,] d_C) {
27 builder.Prep(4, 92);
28 for (int _idx0 = 2; _idx0 > 0; _idx0--) {
29 builder.Prep(4, 12);
30 builder.Pad(1);
31 for (int _idx1 = 2; _idx1 > 0; _idx1--) {
32 builder.PutSbyte((sbyte)d_C[_idx0-1,_idx1-1]);
33 }
34 builder.PutSbyte((sbyte)d_B[_idx0-1]);
35 for (int _idx1 = 2; _idx1 > 0; _idx1--) {
36 builder.PutInt(d_A[_idx0-1,_idx1-1]);
37 }
38 }
39 builder.Pad(3);
40 builder.PutSbyte(C);
41 for (int _idx0 = 15; _idx0 > 0; _idx0--) {
42 builder.PutInt(B[_idx0-1]);
43 }
44 builder.PutFloat(A);
45 return new Offset<MyGame.Example.ArrayStruct>(builder.Offset);
46 }
47};
48
49
50}