-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuint32.py
More file actions
39 lines (31 loc) · 1.27 KB
/
uint32.py
File metadata and controls
39 lines (31 loc) · 1.27 KB
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
30
31
32
33
34
35
36
37
38
39
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: FSD
import flatbuffers
class uint32(object):
__slots__ = ['_tab']
@classmethod
def GetRootAsuint32(cls, buf, offset):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = uint32()
x.Init(buf, n + offset)
return x
# uint32
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# uint32
def Value(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
a = self._tab.Vector(o)
return self._tab.Get(flatbuffers.number_types.Uint32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
return 0
# uint32
def ValueLength(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.VectorLen(o)
return 0
def uint32Start(builder): builder.StartObject(1)
def uint32AddValue(builder, value): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(value), 0)
def uint32StartValueVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def uint32End(builder): return builder.EndObject()