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 class Test : Struct() { 11 __initnull12 fun __init(_i: Int, _bb: ByteBuffer) { 13 __reset(_i, _bb) 14 } __assignnull15 fun __assign(_i: Int, _bb: ByteBuffer) : Test { 16 __init(_i, _bb) 17 return this 18 } 19 val a : Short get() = bb.getShort(bb_pos + 0) mutateAnull20 fun mutateA(a: Short) : ByteBuffer = bb.putShort(bb_pos + 0, a) 21 val b : Byte get() = bb.get(bb_pos + 2) 22 fun mutateB(b: Byte) : ByteBuffer = bb.put(bb_pos + 2, b) 23 companion object { 24 fun createTest(builder: FlatBufferBuilder, a: Short, b: Byte) : Int { 25 builder.prep(2, 4) 26 builder.pad(1) 27 builder.putByte(b) 28 builder.putShort(a) 29 return builder.offset() 30 } 31 } 32 } 33