blob: 59ebdc9b95e6c363120003da6c42c450d78c5123 [file] [log] [blame]
Austin Schuhe89fa2d2019-08-14 20:24:23 -07001// automatically generated by the FlatBuffers compiler, do not modify
2
3package NamespaceA.NamespaceB
4
5import java.nio.*
6import kotlin.math.sign
7import com.google.flatbuffers.*
8
9@Suppress("unused")
10@ExperimentalUnsignedTypes
11class TableInNestedNS : Table() {
12
13 fun __init(_i: Int, _bb: ByteBuffer) {
14 __reset(_i, _bb)
15 }
16 fun __assign(_i: Int, _bb: ByteBuffer) : TableInNestedNS {
17 __init(_i, _bb)
18 return this
19 }
20 val foo : Int
21 get() {
22 val o = __offset(4)
23 return if(o != 0) bb.getInt(o + bb_pos) else 0
24 }
25 fun mutateFoo(foo: Int) : Boolean {
26 val o = __offset(4)
27 return if (o != 0) {
28 bb.putInt(o + bb_pos, foo)
29 true
30 } else {
31 false
32 }
33 }
34 companion object {
35 fun validateVersion() = Constants.FLATBUFFERS_1_11_1()
36 fun getRootAsTableInNestedNS(_bb: ByteBuffer): TableInNestedNS = getRootAsTableInNestedNS(_bb, TableInNestedNS())
37 fun getRootAsTableInNestedNS(_bb: ByteBuffer, obj: TableInNestedNS): TableInNestedNS {
38 _bb.order(ByteOrder.LITTLE_ENDIAN)
39 return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb))
40 }
41 fun createTableInNestedNS(builder: FlatBufferBuilder, foo: Int) : Int {
42 builder.startTable(1)
43 addFoo(builder, foo)
44 return endTableInNestedNS(builder)
45 }
46 fun startTableInNestedNS(builder: FlatBufferBuilder) = builder.startTable(1)
47 fun addFoo(builder: FlatBufferBuilder, foo: Int) = builder.addInt(0, foo, 0)
48 fun endTableInNestedNS(builder: FlatBufferBuilder) : Int {
49 val o = builder.endTable()
50 return o
51 }
52 }
53}