blob: b10d35df4260ba8609352e1e8698d09311dd81e3 [file] [log] [blame]
Austin Schuhe89fa2d2019-08-14 20:24:23 -07001# automatically generated by the FlatBuffers compiler, do not modify
2
3# namespace: Example
4
5class Any(object):
6 NONE = 0
7 Monster = 1
8 TestSimpleTableWithEnum = 2
9 MyGame_Example2_Monster = 3
10
Austin Schuh272c6132020-11-14 16:37:52 -080011
12def AnyCreator(unionType, table):
13 from flatbuffers.table import Table
14 if not isinstance(table, Table):
15 return None
16 if unionType == Any().Monster:
17 import MyGame.Example.Monster
18 return MyGame.Example.Monster.MonsterT.InitFromBuf(table.Bytes, table.Pos)
19 if unionType == Any().TestSimpleTableWithEnum:
20 import MyGame.Example.TestSimpleTableWithEnum
21 return MyGame.Example.TestSimpleTableWithEnum.TestSimpleTableWithEnumT.InitFromBuf(table.Bytes, table.Pos)
22 if unionType == Any().MyGame_Example2_Monster:
23 import MyGame.Example2.Monster
24 return MyGame.Example2.Monster.MonsterT.InitFromBuf(table.Bytes, table.Pos)
25 return None