39 lines
1.2 KiB
Python
39 lines
1.2 KiB
Python
|
# automatically generated by the FlatBuffers compiler, do not modify
|
||
|
|
||
|
# namespace: graph
|
||
|
|
||
|
import flatbuffers
|
||
|
|
||
|
class IntPair(object):
|
||
|
__slots__ = ['_tab']
|
||
|
|
||
|
@classmethod
|
||
|
def GetRootAsIntPair(cls, buf, offset):
|
||
|
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
|
||
|
x = IntPair()
|
||
|
x.Init(buf, n + offset)
|
||
|
return x
|
||
|
|
||
|
# IntPair
|
||
|
def Init(self, buf, pos):
|
||
|
self._tab = flatbuffers.table.Table(buf, pos)
|
||
|
|
||
|
# IntPair
|
||
|
def First(self):
|
||
|
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
|
||
|
if o != 0:
|
||
|
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
|
||
|
return 0
|
||
|
|
||
|
# IntPair
|
||
|
def Second(self):
|
||
|
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
|
||
|
if o != 0:
|
||
|
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
|
||
|
return 0
|
||
|
|
||
|
def IntPairStart(builder): builder.StartObject(2)
|
||
|
def IntPairAddFirst(builder, first): builder.PrependInt32Slot(0, first, 0)
|
||
|
def IntPairAddSecond(builder, second): builder.PrependInt32Slot(1, second, 0)
|
||
|
def IntPairEnd(builder): return builder.EndObject()
|