blob: f2ceed6f5a743e2b6bfef86c38aa15de38030e68 [file] [log] [blame]
Austin Schuhe89fa2d2019-08-14 20:24:23 -07001// automatically generated by the FlatBuffers compiler, do not modify
2
3package MyGame.Example
4
5import java.nio.*
6import kotlin.math.sign
7import com.google.flatbuffers.*
8
9@Suppress("unused")
10@ExperimentalUnsignedTypes
11class Test : Struct() {
12
13 fun __init(_i: Int, _bb: ByteBuffer) {
14 __reset(_i, _bb)
15 }
16 fun __assign(_i: Int, _bb: ByteBuffer) : Test {
17 __init(_i, _bb)
18 return this
19 }
20 val a : Short get() = bb.getShort(bb_pos + 0)
21 fun mutateA(a: Short) : ByteBuffer = bb.putShort(bb_pos + 0, a)
22 val b : Byte get() = bb.get(bb_pos + 2)
23 fun mutateB(b: Byte) : ByteBuffer = bb.put(bb_pos + 2, b)
24 companion object {
25 fun createTest(builder: FlatBufferBuilder, a: Short, b: Byte) : Int {
26 builder.prep(2, 4)
27 builder.pad(1)
28 builder.putByte(b)
29 builder.putShort(a)
30 return builder.offset()
31 }
32 }
33}