blob: 1e18bca635fdc692f48a451747fe37b1048071ee [file] [log] [blame]
Eric Kunze2364dcd2021-04-26 11:06:57 -07001# automatically generated by the FlatBuffers compiler, do not modify
2
Eric Kunze2364dcd2021-04-26 11:06:57 -07003# namespace: tosa
4
5import flatbuffers
6from flatbuffers.compat import import_numpy
7np = import_numpy()
8
9class WhileLoopAttribute(object):
10 __slots__ = ['_tab']
11
12 @classmethod
13 def GetRootAsWhileLoopAttribute(cls, buf, offset):
14 n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
15 x = WhileLoopAttribute()
16 x.Init(buf, n + offset)
17 return x
18
19 @classmethod
20 def WhileLoopAttributeBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
21 return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x4F\x53\x41", size_prefixed=size_prefixed)
22
23 # WhileLoopAttribute
24 def Init(self, buf, pos):
25 self._tab = flatbuffers.table.Table(buf, pos)
26
27 # WhileLoopAttribute
28 def CondBranch(self):
29 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
30 if o != 0:
31 return self._tab.String(o + self._tab.Pos)
32 return None
33
34 # WhileLoopAttribute
35 def BodyBranch(self):
36 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
37 if o != 0:
38 return self._tab.String(o + self._tab.Pos)
39 return None
40
41def WhileLoopAttributeStart(builder): builder.StartObject(2)
42def WhileLoopAttributeAddCondBranch(builder, condBranch): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(condBranch), 0)
43def WhileLoopAttributeAddBodyBranch(builder, bodyBranch): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(bodyBranch), 0)
44def WhileLoopAttributeEnd(builder): return builder.EndObject()