Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 1 | # automatically generated by the FlatBuffers compiler, do not modify |
| 2 | |
| 3 | # namespace: Example |
| 4 | |
| 5 | class AnyAmbiguousAliases(object): |
| 6 | NONE = 0 |
| 7 | M1 = 1 |
| 8 | M2 = 2 |
| 9 | M3 = 3 |
| 10 | |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame^] | 11 | |
| 12 | def AnyAmbiguousAliasesCreator(unionType, table): |
| 13 | from flatbuffers.table import Table |
| 14 | if not isinstance(table, Table): |
| 15 | return None |
| 16 | if unionType == AnyAmbiguousAliases().M1: |
| 17 | import MyGame.Example.Monster |
| 18 | return MyGame.Example.Monster.MonsterT.InitFromBuf(table.Bytes, table.Pos) |
| 19 | if unionType == AnyAmbiguousAliases().M2: |
| 20 | import MyGame.Example.Monster |
| 21 | return MyGame.Example.Monster.MonsterT.InitFromBuf(table.Bytes, table.Pos) |
| 22 | if unionType == AnyAmbiguousAliases().M3: |
| 23 | import MyGame.Example.Monster |
| 24 | return MyGame.Example.Monster.MonsterT.InitFromBuf(table.Bytes, table.Pos) |
| 25 | return None |