1 // automatically generated by the FlatBuffers compiler, do not modify 2 3 package MyGame.Example 4 5 import java.nio.* 6 import kotlin.math.sign 7 import com.google.flatbuffers.* 8 9 @Suppress("unused") 10 @ExperimentalUnsignedTypes 11 class StructOfStructs : Struct() { 12 __initnull13 fun __init(_i: Int, _bb: ByteBuffer) { 14 __reset(_i, _bb) 15 } __assignnull16 fun __assign(_i: Int, _bb: ByteBuffer) : StructOfStructs { 17 __init(_i, _bb) 18 return this 19 } 20 val a : MyGame.Example.Ability? get() = a(MyGame.Example.Ability()) anull21 fun a(obj: MyGame.Example.Ability) : MyGame.Example.Ability? = obj.__assign(bb_pos + 0, bb) 22 val b : MyGame.Example.Test? get() = b(MyGame.Example.Test()) 23 fun b(obj: MyGame.Example.Test) : MyGame.Example.Test? = obj.__assign(bb_pos + 8, bb) 24 val c : MyGame.Example.Ability? get() = c(MyGame.Example.Ability()) 25 fun c(obj: MyGame.Example.Ability) : MyGame.Example.Ability? = obj.__assign(bb_pos + 12, bb) 26 companion object { 27 fun createStructOfStructs(builder: FlatBufferBuilder, a_id: UInt, a_distance: UInt, b_a: Short, b_b: Byte, c_id: UInt, c_distance: UInt) : Int { 28 builder.prep(4, 20) 29 builder.prep(4, 8) 30 builder.putInt(c_distance.toInt()) 31 builder.putInt(c_id.toInt()) 32 builder.prep(2, 4) 33 builder.pad(1) 34 builder.putByte(b_b) 35 builder.putShort(b_a) 36 builder.prep(4, 8) 37 builder.putInt(a_distance.toInt()) 38 builder.putInt(a_id.toInt()) 39 return builder.offset() 40 } 41 } 42 } 43