Eric Kunze | 2364dcd | 2021-04-26 11:06:57 -0700 | [diff] [blame] | 1 | # automatically generated by the FlatBuffers compiler, do not modify |
| 2 | |
Eric Kunze | 2364dcd | 2021-04-26 11:06:57 -0700 | [diff] [blame] | 3 | # namespace: tosa |
| 4 | |
| 5 | import flatbuffers |
| 6 | from flatbuffers.compat import import_numpy |
| 7 | np = import_numpy() |
| 8 | |
| 9 | class 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 | |
| 41 | def WhileLoopAttributeStart(builder): builder.StartObject(2) |
| 42 | def WhileLoopAttributeAddCondBranch(builder, condBranch): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(condBranch), 0) |
| 43 | def WhileLoopAttributeAddBodyBranch(builder, bodyBranch): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(bodyBranch), 0) |
| 44 | def WhileLoopAttributeEnd(builder): return builder.EndObject() |