1 // automatically generated by the FlatBuffers compiler, do not modify
6 import kotlin.math.sign
7 import com.google.flatbuffers.*
10 @ExperimentalUnsignedTypes
11 class TableInFirstNS : Table() {
13 fun __init(_i: Int, _bb: ByteBuffer) {
16 fun __assign(_i: Int, _bb: ByteBuffer) : TableInFirstNS {
20 val fooTable : NamespaceA.NamespaceB.TableInNestedNS? get() = fooTable(NamespaceA.NamespaceB.TableInNestedNS())
21 fun fooTable(obj: NamespaceA.NamespaceB.TableInNestedNS) : NamespaceA.NamespaceB.TableInNestedNS? {
24 obj.__assign(__indirect(o + bb_pos), bb)
32 return if(o != 0) bb.get(o + bb_pos) else 0
34 fun mutateFooEnum(fooEnum: Byte) : Boolean {
37 bb.put(o + bb_pos, fooEnum)
43 val fooUnionType : UByte
46 return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u
48 fun mutateFooUnionType(fooUnionType: UByte) : Boolean {
51 bb.put(o + bb_pos, fooUnionType.toByte())
57 fun fooUnion(obj: Table) : Table? {
58 val o = __offset(10); return if (o != 0) __union(obj, o + bb_pos) else null
60 val fooStruct : NamespaceA.NamespaceB.StructInNestedNS? get() = fooStruct(NamespaceA.NamespaceB.StructInNestedNS())
61 fun fooStruct(obj: NamespaceA.NamespaceB.StructInNestedNS) : NamespaceA.NamespaceB.StructInNestedNS? {
64 obj.__assign(o + bb_pos, bb)
70 fun validateVersion() = Constants.FLATBUFFERS_2_0_0()
71 fun getRootAsTableInFirstNS(_bb: ByteBuffer): TableInFirstNS = getRootAsTableInFirstNS(_bb, TableInFirstNS())
72 fun getRootAsTableInFirstNS(_bb: ByteBuffer, obj: TableInFirstNS): TableInFirstNS {
73 _bb.order(ByteOrder.LITTLE_ENDIAN)
74 return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb))
76 fun startTableInFirstNS(builder: FlatBufferBuilder) = builder.startTable(5)
77 fun addFooTable(builder: FlatBufferBuilder, fooTable: Int) = builder.addOffset(0, fooTable, 0)
78 fun addFooEnum(builder: FlatBufferBuilder, fooEnum: Byte) = builder.addByte(1, fooEnum, 0)
79 fun addFooUnionType(builder: FlatBufferBuilder, fooUnionType: UByte) = builder.addByte(2, fooUnionType.toByte(), 0)
80 fun addFooUnion(builder: FlatBufferBuilder, fooUnion: Int) = builder.addOffset(3, fooUnion, 0)
81 fun addFooStruct(builder: FlatBufferBuilder, fooStruct: Int) = builder.addStruct(4, fooStruct, 0)
82 fun endTableInFirstNS(builder: FlatBufferBuilder) : Int {
83 val o = builder.endTable()