blob: eda574217f167cc4f859b0d690889b2f691c7b1b [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")
Austin Schuhe89fa2d2019-08-14 20:24:23 -070010class Test : Struct() {
11
12 fun __init(_i: Int, _bb: ByteBuffer) {
13 __reset(_i, _bb)
14 }
15 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)
20 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}