...
1// automatically generated by the FlatBuffers compiler, do not modify
2
3package MyGame.Example;
4
5import com.google.flatbuffers.BaseVector;
6import com.google.flatbuffers.BooleanVector;
7import com.google.flatbuffers.ByteVector;
8import com.google.flatbuffers.Constants;
9import com.google.flatbuffers.DoubleVector;
10import com.google.flatbuffers.FlatBufferBuilder;
11import com.google.flatbuffers.FloatVector;
12import com.google.flatbuffers.IntVector;
13import com.google.flatbuffers.LongVector;
14import com.google.flatbuffers.ShortVector;
15import com.google.flatbuffers.StringVector;
16import com.google.flatbuffers.Struct;
17import com.google.flatbuffers.Table;
18import com.google.flatbuffers.UnionVector;
19import java.nio.ByteBuffer;
20import java.nio.ByteOrder;
21
22@SuppressWarnings("unused")
23public final class StructOfStructsOfStructs extends Struct {
24 public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
25 public StructOfStructsOfStructs __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
26
27 public MyGame.Example.StructOfStructs a() { return a(new MyGame.Example.StructOfStructs()); }
28 public MyGame.Example.StructOfStructs a(MyGame.Example.StructOfStructs obj) { return obj.__assign(bb_pos + 0, bb); }
29
30 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) {
31 builder.prep(4, 20);
32 builder.prep(4, 20);
33 builder.prep(4, 8);
34 builder.putInt((int) a_c_distance);
35 builder.putInt((int) a_c_id);
36 builder.prep(2, 4);
37 builder.pad(1);
38 builder.putByte(a_b_b);
39 builder.putShort(a_b_a);
40 builder.prep(4, 8);
41 builder.putInt((int) a_a_distance);
42 builder.putInt((int) a_a_id);
43 return builder.offset();
44 }
45
46 public static final class Vector extends BaseVector {
47 public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
48
49 public StructOfStructsOfStructs get(int j) { return get(new StructOfStructsOfStructs(), j); }
50 public StructOfStructsOfStructs get(StructOfStructsOfStructs obj, int j) { return obj.__assign(__element(j), bb); }
51 }
52 public StructOfStructsOfStructsT unpack() {
53 StructOfStructsOfStructsT _o = new StructOfStructsOfStructsT();
54 unpackTo(_o);
55 return _o;
56 }
57 public void unpackTo(StructOfStructsOfStructsT _o) {
58 a().unpackTo(_o.getA());
59 }
60 public static int pack(FlatBufferBuilder builder, StructOfStructsOfStructsT _o) {
61 if (_o == null) return 0;
62 int _a_a_id = (int) _o.getA().getA().getId();
63 int _a_a_distance = (int) _o.getA().getA().getDistance();
64 short _a_b_a = _o.getA().getB().getA();
65 byte _a_b_b = _o.getA().getB().getB();
66 int _a_c_id = (int) _o.getA().getC().getId();
67 int _a_c_distance = (int) _o.getA().getC().getDistance();
68 return createStructOfStructsOfStructs(
69 builder,
70 _a_a_id,
71 _a_a_distance,
72 _a_b_a,
73 _a_b_b,
74 _a_c_id,
75 _a_c_distance);
76 }
77}
78
View as plain text