Austin Schuh | 2dd86a9 | 2022-09-14 21:19: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 StructOfStructsOfStructs extends Struct { |
| 12 | public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } |
| 13 | public StructOfStructsOfStructs __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } |
| 14 | |
| 15 | public MyGame.Example.StructOfStructs a() { return a(new MyGame.Example.StructOfStructs()); } |
| 16 | public MyGame.Example.StructOfStructs a(MyGame.Example.StructOfStructs obj) { return obj.__assign(bb_pos + 0, bb); } |
| 17 | |
| 18 | public static int createStructOfStructsOfStructs(FlatBufferBuilder builder, long a_a_id, long a_a_distance, short a_b_a, byte a_b_b, long a_c_id, long a_c_distance) { |
| 19 | builder.prep(4, 20); |
| 20 | builder.prep(4, 20); |
| 21 | builder.prep(4, 8); |
| 22 | builder.putInt((int) a_c_distance); |
| 23 | builder.putInt((int) a_c_id); |
| 24 | builder.prep(2, 4); |
| 25 | builder.pad(1); |
| 26 | builder.putByte(a_b_b); |
| 27 | builder.putShort(a_b_a); |
| 28 | builder.prep(4, 8); |
| 29 | builder.putInt((int) a_a_distance); |
| 30 | builder.putInt((int) a_a_id); |
| 31 | return builder.offset(); |
| 32 | } |
| 33 | |
| 34 | public static final class Vector extends BaseVector { |
| 35 | public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } |
| 36 | |
| 37 | public StructOfStructsOfStructs get(int j) { return get(new StructOfStructsOfStructs(), j); } |
| 38 | public StructOfStructsOfStructs get(StructOfStructsOfStructs obj, int j) { return obj.__assign(__element(j), bb); } |
| 39 | } |
| 40 | public StructOfStructsOfStructsT unpack() { |
| 41 | StructOfStructsOfStructsT _o = new StructOfStructsOfStructsT(); |
| 42 | unpackTo(_o); |
| 43 | return _o; |
| 44 | } |
| 45 | public void unpackTo(StructOfStructsOfStructsT _o) { |
| 46 | a().unpackTo(_o.getA()); |
| 47 | } |
| 48 | public static int pack(FlatBufferBuilder builder, StructOfStructsOfStructsT _o) { |
| 49 | if (_o == null) return 0; |
James Kuszmaul | 3b15b0c | 2022-11-08 14:03:16 -0800 | [diff] [blame^] | 50 | int _a_a_id = (int) _o.getA().getA().getId(); |
| 51 | int _a_a_distance = (int) _o.getA().getA().getDistance(); |
Austin Schuh | 2dd86a9 | 2022-09-14 21:19:23 -0700 | [diff] [blame] | 52 | short _a_b_a = _o.getA().getB().getA(); |
| 53 | byte _a_b_b = _o.getA().getB().getB(); |
James Kuszmaul | 3b15b0c | 2022-11-08 14:03:16 -0800 | [diff] [blame^] | 54 | int _a_c_id = (int) _o.getA().getC().getId(); |
| 55 | int _a_c_distance = (int) _o.getA().getC().getDistance(); |
Austin Schuh | 2dd86a9 | 2022-09-14 21:19:23 -0700 | [diff] [blame] | 56 | return createStructOfStructsOfStructs( |
| 57 | builder, |
| 58 | _a_a_id, |
| 59 | _a_a_distance, |
| 60 | _a_b_a, |
| 61 | _a_b_b, |
| 62 | _a_c_id, |
| 63 | _a_c_distance); |
| 64 | } |
| 65 | } |
| 66 | |