...
1// automatically generated by the FlatBuffers compiler, do not modify
2
3package NamespaceA
4
5import com.google.flatbuffers.BaseVector
6import com.google.flatbuffers.BooleanVector
7import com.google.flatbuffers.ByteVector
8import com.google.flatbuffers.Constants
9import com.google.flatbuffers.DoubleVector
10import com.google.flatbuffers.FlatBufferBuilder
11import com.google.flatbuffers.FloatVector
12import com.google.flatbuffers.LongVector
13import com.google.flatbuffers.StringVector
14import com.google.flatbuffers.Struct
15import com.google.flatbuffers.Table
16import com.google.flatbuffers.UnionVector
17import java.nio.ByteBuffer
18import java.nio.ByteOrder
19import kotlin.math.sign
20
21@Suppress("unused")
22@ExperimentalUnsignedTypes
23class SecondTableInA : Table() {
24
25 fun __init(_i: Int, _bb: ByteBuffer) {
26 __reset(_i, _bb)
27 }
28 fun __assign(_i: Int, _bb: ByteBuffer) : SecondTableInA {
29 __init(_i, _bb)
30 return this
31 }
32 val referToC : NamespaceC.TableInC? get() = referToC(NamespaceC.TableInC())
33 fun referToC(obj: NamespaceC.TableInC) : NamespaceC.TableInC? {
34 val o = __offset(4)
35 return if (o != 0) {
36 obj.__assign(__indirect(o + bb_pos), bb)
37 } else {
38 null
39 }
40 }
41 companion object {
42 fun validateVersion() = Constants.FLATBUFFERS_23_5_26()
43 fun getRootAsSecondTableInA(_bb: ByteBuffer): SecondTableInA = getRootAsSecondTableInA(_bb, SecondTableInA())
44 fun getRootAsSecondTableInA(_bb: ByteBuffer, obj: SecondTableInA): SecondTableInA {
45 _bb.order(ByteOrder.LITTLE_ENDIAN)
46 return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb))
47 }
48 fun createSecondTableInA(builder: FlatBufferBuilder, referToCOffset: Int) : Int {
49 builder.startTable(1)
50 addReferToC(builder, referToCOffset)
51 return endSecondTableInA(builder)
52 }
53 fun startSecondTableInA(builder: FlatBufferBuilder) = builder.startTable(1)
54 fun addReferToC(builder: FlatBufferBuilder, referToC: Int) = builder.addOffset(0, referToC, 0)
55 fun endSecondTableInA(builder: FlatBufferBuilder) : Int {
56 val o = builder.endTable()
57 return o
58 }
59 }
60}
View as plain text