xref: /aosp_15_r20/external/flatbuffers/tests/union_vector/Rapunzel.kt (revision 890232f25432b36107d06881e0a25aaa6b473652)
1 // automatically generated by the FlatBuffers compiler, do not modify
2 
3 import java.nio.*
4 import kotlin.math.sign
5 import com.google.flatbuffers.*
6 
7 @Suppress("unused")
8 class Rapunzel : Struct() {
9 
__initnull10     fun __init(_i: Int, _bb: ByteBuffer)  {
11         __reset(_i, _bb)
12     }
__assignnull13     fun __assign(_i: Int, _bb: ByteBuffer) : Rapunzel {
14         __init(_i, _bb)
15         return this
16     }
17     val hairLength : Int get() = bb.getInt(bb_pos + 0)
mutateHairLengthnull18     fun mutateHairLength(hairLength: Int) : ByteBuffer = bb.putInt(bb_pos + 0, hairLength)
19     companion object {
20         fun createRapunzel(builder: FlatBufferBuilder, hairLength: Int) : Int {
21             builder.prep(4, 4)
22             builder.putInt(hairLength)
23             return builder.offset()
24         }
25     }
26 }
27