• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# automatically generated by the FlatBuffers compiler, do not modify
2
3# namespace: MyGame
4
5import flatbuffers
6from flatbuffers.compat import import_numpy
7np = import_numpy()
8
9class InParentNamespace(object):
10    __slots__ = ['_tab']
11
12    @classmethod
13    def GetRootAs(cls, buf, offset=0):
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 GetRootAsInParentNamespace(cls, buf, offset=0):
21        """This method is deprecated. Please switch to GetRootAs."""
22        return cls.GetRootAs(buf, offset)
23    @classmethod
24    def InParentNamespaceBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
25        return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x4D\x4F\x4E\x53", size_prefixed=size_prefixed)
26
27    # InParentNamespace
28    def Init(self, buf, pos):
29        self._tab = flatbuffers.table.Table(buf, pos)
30
31def Start(builder): builder.StartObject(0)
32def InParentNamespaceStart(builder):
33    """This method is deprecated. Please switch to Start."""
34    return Start(builder)
35def End(builder): return builder.EndObject()
36def InParentNamespaceEnd(builder):
37    """This method is deprecated. Please switch to End."""
38    return End(builder)
39
40class InParentNamespaceT(object):
41
42    # InParentNamespaceT
43    def __init__(self):
44        pass
45
46    @classmethod
47    def InitFromBuf(cls, buf, pos):
48        inParentNamespace = InParentNamespace()
49        inParentNamespace.Init(buf, pos)
50        return cls.InitFromObj(inParentNamespace)
51
52    @classmethod
53    def InitFromObj(cls, inParentNamespace):
54        x = InParentNamespaceT()
55        x._UnPack(inParentNamespace)
56        return x
57
58    # InParentNamespaceT
59    def _UnPack(self, inParentNamespace):
60        if inParentNamespace is None:
61            return
62
63    # InParentNamespaceT
64    def Pack(self, builder):
65        Start(builder)
66        inParentNamespace = End(builder)
67        return inParentNamespace
68