blob: aa742f4bc267d6e578cca8056a6d2d9b91901a9f [file] [log] [blame]
Austin Schuhe89fa2d2019-08-14 20:24:23 -07001# automatically generated by the FlatBuffers compiler, do not modify
2
3# namespace: Example
4
5import flatbuffers
6
7class NestedStruct(object):
8 __slots__ = ['_tab']
9
10 # NestedStruct
11 def Init(self, buf, pos):
12 self._tab = flatbuffers.table.Table(buf, pos)
13
14 # NestedStruct
15 def A(self): return [self._tab.Get(flatbuffers.number_types.Int32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0 + i * 4)) for i in range(2)]
16 # NestedStruct
17 def B(self): return self._tab.Get(flatbuffers.number_types.Int8Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(8))
18 # NestedStruct
19 def C(self): return [self._tab.Get(flatbuffers.number_types.Int8Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(9 + i * 1)) for i in range(2)]
20
21def CreateNestedStruct(builder, a, b, c):
22 builder.Prep(4, 12)
23 builder.Pad(1)
24 for _idx0 in range(2 , 0, -1):
25 builder.PrependInt8(c[_idx0-1])
26 builder.PrependInt8(b)
27 for _idx0 in range(2 , 0, -1):
28 builder.PrependInt32(a[_idx0-1])
29 return builder.Offset()