blob: 0098c5566e75318820e186c83f56d4d961801db4 [file] [log] [blame]
Austin Schuhe89fa2d2019-08-14 20:24:23 -07001// automatically generated by the FlatBuffers compiler, do not modify
2
3package MyGame.Example;
4
5import java.nio.*;
6import java.lang.*;
7import java.util.*;
8import com.google.flatbuffers.*;
9
10@SuppressWarnings("unused")
11public final class ArrayStruct extends Struct {
12 public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
13 public ArrayStruct __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
14
15 public float a() { return bb.getFloat(bb_pos + 0); }
16 public void mutateA(float a) { bb.putFloat(bb_pos + 0, a); }
17 public int b(int j) { return bb.getInt(bb_pos + 4 + j * 4); }
18 public void mutateB(int j, int b) { bb.putInt(bb_pos + 4 + j * 4, b); }
19 public byte c() { return bb.get(bb_pos + 64); }
20 public void mutateC(byte c) { bb.put(bb_pos + 64, c); }
21 public MyGame.Example.NestedStruct d(MyGame.Example.NestedStruct obj, int j) { return obj.__assign(bb_pos + 68 + j * 12, bb); }
22
23 public static int createArrayStruct(FlatBufferBuilder builder, float a, int[] b, byte c, int[][] d_a, byte[] d_b, byte[][] d_c) {
24 builder.prep(4, 92);
25 for (int _idx0 = 2; _idx0 > 0; _idx0--) {
26 builder.prep(4, 12);
27 builder.pad(1);
28 for (int _idx1 = 2; _idx1 > 0; _idx1--) {
29 builder.putByte(d_c[_idx0-1][_idx1-1]);
30 }
31 builder.putByte(d_b[_idx0-1]);
32 for (int _idx1 = 2; _idx1 > 0; _idx1--) {
33 builder.putInt(d_a[_idx0-1][_idx1-1]);
34 }
35 }
36 builder.pad(3);
37 builder.putByte(c);
38 for (int _idx0 = 15; _idx0 > 0; _idx0--) {
39 builder.putInt(b[_idx0-1]);
40 }
41 builder.putFloat(a);
42 return builder.offset();
43 }
44}
45