blob: 68655c90d20d0fcaa00cea987bb6b77508ab120b [file] [log] [blame]
Patrik Gustavsson8f1f9aa2021-06-28 07:41:58 +02001# automatically generated by the FlatBuffers compiler, do not modify
2
3# namespace: tosa
4
5import flatbuffers
6
7class WhileLoopAttribute(object):
8 __slots__ = ['_tab']
9
10 @classmethod
11 def GetRootAsWhileLoopAttribute(cls, buf, offset):
12 n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
13 x = WhileLoopAttribute()
14 x.Init(buf, n + offset)
15 return x
16
17 # WhileLoopAttribute
18 def Init(self, buf, pos):
19 self._tab = flatbuffers.table.Table(buf, pos)
20
21 # WhileLoopAttribute
22 def CondBranch(self):
23 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
24 if o != 0:
25 return self._tab.String(o + self._tab.Pos)
26 return None
27
28 # WhileLoopAttribute
29 def BodyBranch(self):
30 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
31 if o != 0:
32 return self._tab.String(o + self._tab.Pos)
33 return None
34
35def WhileLoopAttributeStart(builder): builder.StartObject(2)
36def WhileLoopAttributeAddCondBranch(builder, condBranch): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(condBranch), 0)
37def WhileLoopAttributeAddBodyBranch(builder, bodyBranch): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(bodyBranch), 0)
38def WhileLoopAttributeEnd(builder): return builder.EndObject()