1# automatically generated by the FlatBuffers compiler, do not modify 2 3# namespace: NamespaceA 4 5import flatbuffers 6 7class TableInC(object): 8 __slots__ = ['_tab'] 9 10 # TableInC 11 def Init(self, buf, pos): 12 self._tab = flatbuffers.table.Table(buf, pos) 13 14 # TableInC 15 def ReferToA1(self): 16 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) 17 if o != 0: 18 x = self._tab.Indirect(o + self._tab.Pos) 19 from .TableInFirstNS import TableInFirstNS 20 obj = TableInFirstNS() 21 obj.Init(self._tab.Bytes, x) 22 return obj 23 return None 24 25 # TableInC 26 def ReferToA2(self): 27 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) 28 if o != 0: 29 x = self._tab.Indirect(o + self._tab.Pos) 30 from .SecondTableInA import SecondTableInA 31 obj = SecondTableInA() 32 obj.Init(self._tab.Bytes, x) 33 return obj 34 return None 35 36def TableInCStart(builder): builder.StartObject(2) 37def TableInCAddReferToA1(builder, referToA1): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(referToA1), 0) 38def TableInCAddReferToA2(builder, referToA2): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(referToA2), 0) 39def TableInCEnd(builder): return builder.EndObject() 40