• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# automatically generated by the FlatBuffers compiler, do not modify
2
3# namespace: models
4
5import flatbuffers
6from flatbuffers.compat import import_numpy
7np = import_numpy()
8
9class HelloReply(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 = HelloReply()
16        x.Init(buf, n + offset)
17        return x
18
19    @classmethod
20    def GetRootAsHelloReply(cls, buf, offset=0):
21        """This method is deprecated. Please switch to GetRootAs."""
22        return cls.GetRootAs(buf, offset)
23    # HelloReply
24    def Init(self, buf, pos):
25        self._tab = flatbuffers.table.Table(buf, pos)
26
27    # HelloReply
28    def Message(self):
29        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
30        if o != 0:
31            return self._tab.String(o + self._tab.Pos)
32        return None
33
34def HelloReplyStart(builder): builder.StartObject(1)
35def Start(builder):
36    return HelloReplyStart(builder)
37def HelloReplyAddMessage(builder, message): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(message), 0)
38def AddMessage(builder, message):
39    return HelloReplyAddMessage(builder, message)
40def HelloReplyEnd(builder): return builder.EndObject()
41def End(builder):
42    return HelloReplyEnd(builder)