• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // automatically generated by the FlatBuffers compiler, do not modify
2 
3 package NamespaceA.NamespaceB
4 
5 import java.nio.*
6 import kotlin.math.sign
7 import com.google.flatbuffers.*
8 
9 @Suppress("unused")
10 @ExperimentalUnsignedTypes
11 class TableInNestedNS : Table() {
12 
__initnull13     fun __init(_i: Int, _bb: ByteBuffer)  {
14         __reset(_i, _bb)
15     }
__assignnull16     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         }
mutateFoonull25     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 {
validateVersionnull35         fun validateVersion() = Constants.FLATBUFFERS_1_12_0()
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         }
createTableInNestedNSnull41         fun createTableInNestedNS(builder: FlatBufferBuilder, foo: Int) : Int {
42             builder.startTable(1)
43             addFoo(builder, foo)
44             return endTableInNestedNS(builder)
45         }
startTableInNestedNSnull46         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 }
54