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: MyGame |
| 4 | |
| 5 | import flatbuffers |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame^] | 6 | from flatbuffers.compat import import_numpy |
| 7 | np = import_numpy() |
Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 8 | |
| 9 | class InParentNamespace(object): |
| 10 | __slots__ = ['_tab'] |
| 11 | |
| 12 | @classmethod |
| 13 | def GetRootAsInParentNamespace(cls, buf, offset): |
| 14 | n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) |
| 15 | x = InParentNamespace() |
| 16 | x.Init(buf, n + offset) |
| 17 | return x |
| 18 | |
| 19 | @classmethod |
| 20 | def InParentNamespaceBufferHasIdentifier(cls, buf, offset, size_prefixed=False): |
| 21 | return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x4D\x4F\x4E\x53", size_prefixed=size_prefixed) |
| 22 | |
| 23 | # InParentNamespace |
| 24 | def Init(self, buf, pos): |
| 25 | self._tab = flatbuffers.table.Table(buf, pos) |
| 26 | |
| 27 | def InParentNamespaceStart(builder): builder.StartObject(0) |
| 28 | def InParentNamespaceEnd(builder): return builder.EndObject() |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame^] | 29 | |
| 30 | |
| 31 | class InParentNamespaceT(object): |
| 32 | |
| 33 | # InParentNamespaceT |
| 34 | def __init__(self): |
| 35 | pass |
| 36 | |
| 37 | @classmethod |
| 38 | def InitFromBuf(cls, buf, pos): |
| 39 | inParentNamespace = InParentNamespace() |
| 40 | inParentNamespace.Init(buf, pos) |
| 41 | return cls.InitFromObj(inParentNamespace) |
| 42 | |
| 43 | @classmethod |
| 44 | def InitFromObj(cls, inParentNamespace): |
| 45 | x = InParentNamespaceT() |
| 46 | x._UnPack(inParentNamespace) |
| 47 | return x |
| 48 | |
| 49 | # InParentNamespaceT |
| 50 | def _UnPack(self, inParentNamespace): |
| 51 | if inParentNamespace is None: |
| 52 | return |
| 53 | |
| 54 | # InParentNamespaceT |
| 55 | def Pack(self, builder): |
| 56 | InParentNamespaceStart(builder) |
| 57 | inParentNamespace = InParentNamespaceEnd(builder) |
| 58 | return inParentNamespace |