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