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 { __init(int _i, ByteBuffer _bb)12 public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } __assign(int _i, ByteBuffer _bb)13 public StructOfStructsOfStructs __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 14 a()15 public MyGame.Example.StructOfStructs a() { return a(new MyGame.Example.StructOfStructs()); } a(MyGame.Example.StructOfStructs obj)16 public MyGame.Example.StructOfStructs a(MyGame.Example.StructOfStructs obj) { return obj.__assign(bb_pos + 0, bb); } 17 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)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 { __assign(int _vector, int _element_size, ByteBuffer _bb)35 public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } 36 get(int j)37 public StructOfStructsOfStructs get(int j) { return get(new StructOfStructsOfStructs(), j); } get(StructOfStructsOfStructs obj, int j)38 public StructOfStructsOfStructs get(StructOfStructsOfStructs obj, int j) { return obj.__assign(__element(j), bb); } 39 } unpack()40 public StructOfStructsOfStructsT unpack() { 41 StructOfStructsOfStructsT _o = new StructOfStructsOfStructsT(); 42 unpackTo(_o); 43 return _o; 44 } unpackTo(StructOfStructsOfStructsT _o)45 public void unpackTo(StructOfStructsOfStructsT _o) { 46 a().unpackTo(_o.getA()); 47 } pack(FlatBufferBuilder builder, StructOfStructsOfStructsT _o)48 public static int pack(FlatBufferBuilder builder, StructOfStructsOfStructsT _o) { 49 if (_o == null) return 0; 50 int _a_a_id = _o.getA().getA().getId(); 51 int _a_a_distance = _o.getA().getA().getDistance(); 52 short _a_b_a = _o.getA().getB().getA(); 53 byte _a_b_b = _o.getA().getB().getB(); 54 int _a_c_id = _o.getA().getC().getId(); 55 int _a_c_distance = _o.getA().getC().getDistance(); 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 67