blob: 5c5b3f67c4816e60ba7b81a6ccdd6d298050e84e [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); }
Austin Schuh272c6132020-11-14 16:37:52 -080021 public MyGame.Example.NestedStruct d(MyGame.Example.NestedStruct obj, int j) { return obj.__assign(bb_pos + 72 + j * 32, bb); }
22 public int e() { return bb.getInt(bb_pos + 136); }
23 public void mutateE(int e) { bb.putInt(bb_pos + 136, e); }
24 public long f(int j) { return bb.getLong(bb_pos + 144 + j * 8); }
25 public void mutateF(int j, long f) { bb.putLong(bb_pos + 144 + j * 8, f); }
Austin Schuhe89fa2d2019-08-14 20:24:23 -070026
Austin Schuh272c6132020-11-14 16:37:52 -080027 public static int createArrayStruct(FlatBufferBuilder builder, float a, int[] b, byte c, int[][] d_a, byte[] d_b, byte[][] d_c, long[][] d_d, int e, long[] f) {
28 builder.prep(8, 160);
Austin Schuhe89fa2d2019-08-14 20:24:23 -070029 for (int _idx0 = 2; _idx0 > 0; _idx0--) {
Austin Schuh272c6132020-11-14 16:37:52 -080030 builder.putLong(f[_idx0-1]);
31 }
32 builder.pad(4);
33 builder.putInt(e);
34 for (int _idx0 = 2; _idx0 > 0; _idx0--) {
35 builder.prep(8, 32);
36 for (int _idx1 = 2; _idx1 > 0; _idx1--) {
37 builder.putLong(d_d[_idx0-1][_idx1-1]);
38 }
39 builder.pad(5);
Austin Schuhe89fa2d2019-08-14 20:24:23 -070040 for (int _idx1 = 2; _idx1 > 0; _idx1--) {
41 builder.putByte(d_c[_idx0-1][_idx1-1]);
42 }
43 builder.putByte(d_b[_idx0-1]);
44 for (int _idx1 = 2; _idx1 > 0; _idx1--) {
45 builder.putInt(d_a[_idx0-1][_idx1-1]);
46 }
47 }
Austin Schuh272c6132020-11-14 16:37:52 -080048 builder.pad(7);
Austin Schuhe89fa2d2019-08-14 20:24:23 -070049 builder.putByte(c);
50 for (int _idx0 = 15; _idx0 > 0; _idx0--) {
51 builder.putInt(b[_idx0-1]);
52 }
53 builder.putFloat(a);
54 return builder.offset();
55 }
Austin Schuh272c6132020-11-14 16:37:52 -080056
57 public static final class Vector extends BaseVector {
58 public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
59
60 public ArrayStruct get(int j) { return get(new ArrayStruct(), j); }
61 public ArrayStruct get(ArrayStruct obj, int j) { return obj.__assign(__element(j), bb); }
62 }
Austin Schuhe89fa2d2019-08-14 20:24:23 -070063}
64