| 8 | np = import_numpy() |
| 9 | |
| 10 | class Int(object): |
| 11 | __slots__ = ['_tab'] |
| 12 | |
| 13 | @classmethod |
| 14 | def GetRootAs(cls, buf, offset: int = 0): |
| 15 | n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) |
| 16 | x = Int() |
| 17 | x.Init(buf, n + offset) |
| 18 | return x |
| 19 | |
| 20 | @classmethod |
| 21 | def GetRootAsInt(cls, buf, offset=0): |
| 22 | """This method is deprecated. Please switch to GetRootAs.""" |
| 23 | return cls.GetRootAs(buf, offset) |
| 24 | @classmethod |
| 25 | def IntBufferHasIdentifier(cls, buf, offset, size_prefixed=False): |
| 26 | return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x45\x54\x31\x32", size_prefixed=size_prefixed) |
| 27 | |
| 28 | # Int |
| 29 | def Init(self, buf: bytes, pos: int): |
| 30 | self._tab = flatbuffers.table.Table(buf, pos) |
| 31 | |
| 32 | # Int |
| 33 | def IntVal(self): |
| 34 | o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) |
| 35 | if o != 0: |
| 36 | return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) |
| 37 | return 0 |
| 38 | |
| 39 | def IntStart(builder: flatbuffers.Builder): |
| 40 | builder.StartObject(1) |
no outgoing calls
no test coverage detected