Imported Upstream version 1.7.0
[platform/core/ml/nnfw.git] / tools / tflitefile_tool / tflite / WhileOptions.py
1 # automatically generated by the FlatBuffers compiler, do not modify
2
3 # namespace: onert_tflite
4
5 import flatbuffers
6
7
8 class WhileOptions(object):
9     __slots__ = ['_tab']
10
11     @classmethod
12     def GetRootAsWhileOptions(cls, buf, offset):
13         n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
14         x = WhileOptions()
15         x.Init(buf, n + offset)
16         return x
17
18     # WhileOptions
19     def Init(self, buf, pos):
20         self._tab = flatbuffers.table.Table(buf, pos)
21
22     # WhileOptions
23     def CondSubgraphIndex(self):
24         o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
25         if o != 0:
26             return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
27         return 0
28
29     # WhileOptions
30     def BodySubgraphIndex(self):
31         o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
32         if o != 0:
33             return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
34         return 0
35
36
37 def WhileOptionsStart(builder):
38     builder.StartObject(2)
39
40
41 def WhileOptionsAddCondSubgraphIndex(builder, condSubgraphIndex):
42     builder.PrependInt32Slot(0, condSubgraphIndex, 0)
43
44
45 def WhileOptionsAddBodySubgraphIndex(builder, bodySubgraphIndex):
46     builder.PrependInt32Slot(1, bodySubgraphIndex, 0)
47
48
49 def WhileOptionsEnd(builder):
50     return builder.EndObject()