...
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.LongVector
13import com.google.flatbuffers.StringVector
14import com.google.flatbuffers.Struct
15import com.google.flatbuffers.Table
16import com.google.flatbuffers.UnionVector
17import java.nio.ByteBuffer
18import java.nio.ByteOrder
19import kotlin.math.sign
20
21@Suppress("unused")
22class StructOfStructs : Struct() {
23
24 fun __init(_i: Int, _bb: ByteBuffer) {
25 __reset(_i, _bb)
26 }
27 fun __assign(_i: Int, _bb: ByteBuffer) : StructOfStructs {
28 __init(_i, _bb)
29 return this
30 }
31 val a : MyGame.Example.Ability? get() = a(MyGame.Example.Ability())
32 fun a(obj: MyGame.Example.Ability) : MyGame.Example.Ability? = obj.__assign(bb_pos + 0, bb)
33 val b : MyGame.Example.Test? get() = b(MyGame.Example.Test())
34 fun b(obj: MyGame.Example.Test) : MyGame.Example.Test? = obj.__assign(bb_pos + 8, bb)
35 val c : MyGame.Example.Ability? get() = c(MyGame.Example.Ability())
36 fun c(obj: MyGame.Example.Ability) : MyGame.Example.Ability? = obj.__assign(bb_pos + 12, bb)
37 companion object {
38 fun createStructOfStructs(builder: FlatBufferBuilder, a_id: UInt, a_distance: UInt, b_a: Short, b_b: Byte, c_id: UInt, c_distance: UInt) : Int {
39 builder.prep(4, 20)
40 builder.prep(4, 8)
41 builder.putInt(c_distance.toInt())
42 builder.putInt(c_id.toInt())
43 builder.prep(2, 4)
44 builder.pad(1)
45 builder.putByte(b_b)
46 builder.putShort(b_a)
47 builder.prep(4, 8)
48 builder.putInt(a_distance.toInt())
49 builder.putInt(a_id.toInt())
50 return builder.offset()
51 }
52 }
53}
View as plain text