• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# automatically generated by the FlatBuffers compiler, do not modify
2
3# namespace: MyGame
4
5import flatbuffers
6
7class MonsterExtra(object):
8    __slots__ = ['_tab']
9
10    @classmethod
11    def GetRootAsMonsterExtra(cls, buf, offset):
12        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
13        x = MonsterExtra()
14        x.Init(buf, n + offset)
15        return x
16
17    # MonsterExtra
18    def Init(self, buf, pos):
19        self._tab = flatbuffers.table.Table(buf, pos)
20
21    # MonsterExtra
22    def TestfNan(self):
23        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
24        if o != 0:
25            return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
26        return float('nan')
27
28    # MonsterExtra
29    def TestfPinf(self):
30        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
31        if o != 0:
32            return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
33        return float('inf')
34
35    # MonsterExtra
36    def TestfNinf(self):
37        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
38        if o != 0:
39            return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
40        return float('-inf')
41
42    # MonsterExtra
43    def TestdNan(self):
44        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
45        if o != 0:
46            return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos)
47        return float('nan')
48
49    # MonsterExtra
50    def TestdPinf(self):
51        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
52        if o != 0:
53            return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos)
54        return float('inf')
55
56    # MonsterExtra
57    def TestdNinf(self):
58        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
59        if o != 0:
60            return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos)
61        return float('-inf')
62
63def MonsterExtraStart(builder): builder.StartObject(6)
64def MonsterExtraAddTestfNan(builder, testfNan): builder.PrependFloat32Slot(0, testfNan, float('nan'))
65def MonsterExtraAddTestfPinf(builder, testfPinf): builder.PrependFloat32Slot(1, testfPinf, float('inf'))
66def MonsterExtraAddTestfNinf(builder, testfNinf): builder.PrependFloat32Slot(2, testfNinf, float('-inf'))
67def MonsterExtraAddTestdNan(builder, testdNan): builder.PrependFloat64Slot(3, testdNan, float('nan'))
68def MonsterExtraAddTestdPinf(builder, testdPinf): builder.PrependFloat64Slot(4, testdPinf, float('inf'))
69def MonsterExtraAddTestdNinf(builder, testdNinf): builder.PrependFloat64Slot(5, testdNinf, float('-inf'))
70def MonsterExtraEnd(builder): return builder.EndObject()
71