• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // automatically generated by the FlatBuffers compiler, do not modify
2 
3 package MyGame.Example;
4 
5 import com.google.flatbuffers.BaseVector;
6 import com.google.flatbuffers.BooleanVector;
7 import com.google.flatbuffers.ByteVector;
8 import com.google.flatbuffers.Constants;
9 import com.google.flatbuffers.DoubleVector;
10 import com.google.flatbuffers.FlatBufferBuilder;
11 import com.google.flatbuffers.FloatVector;
12 import com.google.flatbuffers.IntVector;
13 import com.google.flatbuffers.LongVector;
14 import com.google.flatbuffers.ShortVector;
15 import com.google.flatbuffers.StringVector;
16 import com.google.flatbuffers.Struct;
17 import com.google.flatbuffers.Table;
18 import com.google.flatbuffers.UnionVector;
19 import java.nio.ByteBuffer;
20 import java.nio.ByteOrder;
21 
22 @SuppressWarnings("unused")
23 public final class StructOfStructsOfStructs extends Struct {
__init(int _i, ByteBuffer _bb)24   public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
__assign(int _i, ByteBuffer _bb)25   public StructOfStructsOfStructs __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
26 
a()27   public MyGame.Example.StructOfStructs a() { return a(new MyGame.Example.StructOfStructs()); }
a(MyGame.Example.StructOfStructs obj)28   public MyGame.Example.StructOfStructs a(MyGame.Example.StructOfStructs obj) { return obj.__assign(bb_pos + 0, bb); }
29 
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)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 {
__assign(int _vector, int _element_size, ByteBuffer _bb)47     public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
48 
get(int j)49     public StructOfStructsOfStructs get(int j) { return get(new StructOfStructsOfStructs(), j); }
get(StructOfStructsOfStructs obj, int j)50     public StructOfStructsOfStructs get(StructOfStructsOfStructs obj, int j) {  return obj.__assign(__element(j), bb); }
51   }
unpack()52   public StructOfStructsOfStructsT unpack() {
53     StructOfStructsOfStructsT _o = new StructOfStructsOfStructsT();
54     unpackTo(_o);
55     return _o;
56   }
unpackTo(StructOfStructsOfStructsT _o)57   public void unpackTo(StructOfStructsOfStructsT _o) {
58     a().unpackTo(_o.getA());
59   }
pack(FlatBufferBuilder builder, StructOfStructsOfStructsT _o)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 
79