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 TypeAliases extends Table {
24 public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); }
25 public static TypeAliases getRootAsTypeAliases(ByteBuffer _bb) { return getRootAsTypeAliases(_bb, new TypeAliases()); }
26 public static TypeAliases getRootAsTypeAliases(ByteBuffer _bb, TypeAliases obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
27 public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
28 public TypeAliases __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
29
30 public byte i8() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; }
31 public boolean mutateI8(byte i8) { int o = __offset(4); if (o != 0) { bb.put(o + bb_pos, i8); return true; } else { return false; } }
32 public int u8() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; }
33 public boolean mutateU8(int u8) { int o = __offset(6); if (o != 0) { bb.put(o + bb_pos, (byte) u8); return true; } else { return false; } }
34 public short i16() { int o = __offset(8); return o != 0 ? bb.getShort(o + bb_pos) : 0; }
35 public boolean mutateI16(short i16) { int o = __offset(8); if (o != 0) { bb.putShort(o + bb_pos, i16); return true; } else { return false; } }
36 public int u16() { int o = __offset(10); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; }
37 public boolean mutateU16(int u16) { int o = __offset(10); if (o != 0) { bb.putShort(o + bb_pos, (short) u16); return true; } else { return false; } }
38 public int i32() { int o = __offset(12); return o != 0 ? bb.getInt(o + bb_pos) : 0; }
39 public boolean mutateI32(int i32) { int o = __offset(12); if (o != 0) { bb.putInt(o + bb_pos, i32); return true; } else { return false; } }
40 public long u32() { int o = __offset(14); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; }
41 public boolean mutateU32(long u32) { int o = __offset(14); if (o != 0) { bb.putInt(o + bb_pos, (int) u32); return true; } else { return false; } }
42 public long i64() { int o = __offset(16); return o != 0 ? bb.getLong(o + bb_pos) : 0L; }
43 public boolean mutateI64(long i64) { int o = __offset(16); if (o != 0) { bb.putLong(o + bb_pos, i64); return true; } else { return false; } }
44 public long u64() { int o = __offset(18); return o != 0 ? bb.getLong(o + bb_pos) : 0L; }
45 public boolean mutateU64(long u64) { int o = __offset(18); if (o != 0) { bb.putLong(o + bb_pos, u64); return true; } else { return false; } }
46 public float f32() { int o = __offset(20); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; }
47 public boolean mutateF32(float f32) { int o = __offset(20); if (o != 0) { bb.putFloat(o + bb_pos, f32); return true; } else { return false; } }
48 public double f64() { int o = __offset(22); return o != 0 ? bb.getDouble(o + bb_pos) : 0.0; }
49 public boolean mutateF64(double f64) { int o = __offset(22); if (o != 0) { bb.putDouble(o + bb_pos, f64); return true; } else { return false; } }
50 public byte v8(int j) { int o = __offset(24); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; }
51 public int v8Length() { int o = __offset(24); return o != 0 ? __vector_len(o) : 0; }
52 public ByteVector v8Vector() { return v8Vector(new ByteVector()); }
53 public ByteVector v8Vector(ByteVector obj) { int o = __offset(24); return o != 0 ? obj.__assign(__vector(o), bb) : null; }
54 public ByteBuffer v8AsByteBuffer() { return __vector_as_bytebuffer(24, 1); }
55 public ByteBuffer v8InByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 24, 1); }
56 public boolean mutateV8(int j, byte v8) { int o = __offset(24); if (o != 0) { bb.put(__vector(o) + j * 1, v8); return true; } else { return false; } }
57 public double vf64(int j) { int o = __offset(26); return o != 0 ? bb.getDouble(__vector(o) + j * 8) : 0; }
58 public int vf64Length() { int o = __offset(26); return o != 0 ? __vector_len(o) : 0; }
59 public DoubleVector vf64Vector() { return vf64Vector(new DoubleVector()); }
60 public DoubleVector vf64Vector(DoubleVector obj) { int o = __offset(26); return o != 0 ? obj.__assign(__vector(o), bb) : null; }
61 public ByteBuffer vf64AsByteBuffer() { return __vector_as_bytebuffer(26, 8); }
62 public ByteBuffer vf64InByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 26, 8); }
63 public boolean mutateVf64(int j, double vf64) { int o = __offset(26); if (o != 0) { bb.putDouble(__vector(o) + j * 8, vf64); return true; } else { return false; } }
64
65 public static int createTypeAliases(FlatBufferBuilder builder,
66 byte i8,
67 int u8,
68 short i16,
69 int u16,
70 int i32,
71 long u32,
72 long i64,
73 long u64,
74 float f32,
75 double f64,
76 int v8Offset,
77 int vf64Offset) {
78 builder.startTable(12);
79 TypeAliases.addF64(builder, f64);
80 TypeAliases.addU64(builder, u64);
81 TypeAliases.addI64(builder, i64);
82 TypeAliases.addVf64(builder, vf64Offset);
83 TypeAliases.addV8(builder, v8Offset);
84 TypeAliases.addF32(builder, f32);
85 TypeAliases.addU32(builder, u32);
86 TypeAliases.addI32(builder, i32);
87 TypeAliases.addU16(builder, u16);
88 TypeAliases.addI16(builder, i16);
89 TypeAliases.addU8(builder, u8);
90 TypeAliases.addI8(builder, i8);
91 return TypeAliases.endTypeAliases(builder);
92 }
93
94 public static void startTypeAliases(FlatBufferBuilder builder) { builder.startTable(12); }
95 public static void addI8(FlatBufferBuilder builder, byte i8) { builder.addByte(0, i8, 0); }
96 public static void addU8(FlatBufferBuilder builder, int u8) { builder.addByte(1, (byte) u8, (byte) 0); }
97 public static void addI16(FlatBufferBuilder builder, short i16) { builder.addShort(2, i16, 0); }
98 public static void addU16(FlatBufferBuilder builder, int u16) { builder.addShort(3, (short) u16, (short) 0); }
99 public static void addI32(FlatBufferBuilder builder, int i32) { builder.addInt(4, i32, 0); }
100 public static void addU32(FlatBufferBuilder builder, long u32) { builder.addInt(5, (int) u32, (int) 0L); }
101 public static void addI64(FlatBufferBuilder builder, long i64) { builder.addLong(6, i64, 0L); }
102 public static void addU64(FlatBufferBuilder builder, long u64) { builder.addLong(7, u64, 0L); }
103 public static void addF32(FlatBufferBuilder builder, float f32) { builder.addFloat(8, f32, 0.0f); }
104 public static void addF64(FlatBufferBuilder builder, double f64) { builder.addDouble(9, f64, 0.0); }
105 public static void addV8(FlatBufferBuilder builder, int v8Offset) { builder.addOffset(10, v8Offset, 0); }
106 public static int createV8Vector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); }
107 public static int createV8Vector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); }
108 public static void startV8Vector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); }
109 public static void addVf64(FlatBufferBuilder builder, int vf64Offset) { builder.addOffset(11, vf64Offset, 0); }
110 public static int createVf64Vector(FlatBufferBuilder builder, double[] data) { builder.startVector(8, data.length, 8); for (int i = data.length - 1; i >= 0; i--) builder.addDouble(data[i]); return builder.endVector(); }
111 public static void startVf64Vector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); }
112 public static int endTypeAliases(FlatBufferBuilder builder) {
113 int o = builder.endTable();
114 return o;
115 }
116
117 public static final class Vector extends BaseVector {
118 public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
119
120 public TypeAliases get(int j) { return get(new TypeAliases(), j); }
121 public TypeAliases get(TypeAliases obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); }
122 }
123 public TypeAliasesT unpack() {
124 TypeAliasesT _o = new TypeAliasesT();
125 unpackTo(_o);
126 return _o;
127 }
128 public void unpackTo(TypeAliasesT _o) {
129 byte _oI8 = i8();
130 _o.setI8(_oI8);
131 int _oU8 = u8();
132 _o.setU8(_oU8);
133 short _oI16 = i16();
134 _o.setI16(_oI16);
135 int _oU16 = u16();
136 _o.setU16(_oU16);
137 int _oI32 = i32();
138 _o.setI32(_oI32);
139 long _oU32 = u32();
140 _o.setU32(_oU32);
141 long _oI64 = i64();
142 _o.setI64(_oI64);
143 long _oU64 = u64();
144 _o.setU64(_oU64);
145 float _oF32 = f32();
146 _o.setF32(_oF32);
147 double _oF64 = f64();
148 _o.setF64(_oF64);
149 byte[] _oV8 = new byte[v8Length()];
150 for (int _j = 0; _j < v8Length(); ++_j) {_oV8[_j] = v8(_j);}
151 _o.setV8(_oV8);
152 double[] _oVf64 = new double[vf64Length()];
153 for (int _j = 0; _j < vf64Length(); ++_j) {_oVf64[_j] = vf64(_j);}
154 _o.setVf64(_oVf64);
155 }
156 public static int pack(FlatBufferBuilder builder, TypeAliasesT _o) {
157 if (_o == null) return 0;
158 int _v8 = 0;
159 if (_o.getV8() != null) {
160 _v8 = createV8Vector(builder, _o.getV8());
161 }
162 int _vf64 = 0;
163 if (_o.getVf64() != null) {
164 _vf64 = createVf64Vector(builder, _o.getVf64());
165 }
166 return createTypeAliases(
167 builder,
168 _o.getI8(),
169 _o.getU8(),
170 _o.getI16(),
171 _o.getU16(),
172 _o.getI32(),
173 _o.getU32(),
174 _o.getI64(),
175 _o.getU64(),
176 _o.getF32(),
177 _o.getF64(),
178 _v8,
179 _vf64);
180 }
181}
182
View as plain text