Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame^] | 1 | // automatically generated by the FlatBuffers compiler, do not modify |
| 2 | |
| 3 | package MyGame.Example; |
| 4 | |
| 5 | import java.nio.*; |
| 6 | import java.lang.*; |
| 7 | import java.util.*; |
| 8 | import com.google.flatbuffers.*; |
| 9 | |
| 10 | @SuppressWarnings("unused") |
| 11 | public 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 | |