...
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 Test extends Struct {
24 public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
25 public Test __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
26
27 public short a() { return bb.getShort(bb_pos + 0); }
28 public void mutateA(short a) { bb.putShort(bb_pos + 0, a); }
29 public byte b() { return bb.get(bb_pos + 2); }
30 public void mutateB(byte b) { bb.put(bb_pos + 2, b); }
31
32 public static int createTest(FlatBufferBuilder builder, short a, byte b) {
33 builder.prep(2, 4);
34 builder.pad(1);
35 builder.putByte(b);
36 builder.putShort(a);
37 return builder.offset();
38 }
39
40 public static final class Vector extends BaseVector {
41 public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
42
43 public Test get(int j) { return get(new Test(), j); }
44 public Test get(Test obj, int j) { return obj.__assign(__element(j), bb); }
45 }
46 public TestT unpack() {
47 TestT _o = new TestT();
48 unpackTo(_o);
49 return _o;
50 }
51 public void unpackTo(TestT _o) {
52 short _oA = a();
53 _o.setA(_oA);
54 byte _oB = b();
55 _o.setB(_oB);
56 }
57 public static int pack(FlatBufferBuilder builder, TestT _o) {
58 if (_o == null) return 0;
59 return createTest(
60 builder,
61 _o.getA(),
62 _o.getB());
63 }
64}
65
View as plain text