# automatically generated by the FlatBuffers compiler, do not modify
# namespace: proto
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
[docs]class Challenge(object):
__slots__ = ['_tab']
[docs] @classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Challenge()
x.Init(buf, n + offset)
return x
[docs] @classmethod
def GetRootAsChallenge(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# Challenge
[docs] def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# Challenge
[docs] def Method(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Uint8Flags, o + self._tab.Pos)
return 0
# Challenge
[docs]def ChallengeStart(builder): builder.StartObject(2)
[docs]def Start(builder):
return ChallengeStart(builder)
[docs]def ChallengeAddMethod(builder, method): builder.PrependUint8Slot(0, method, 0)
[docs]def AddMethod(builder, method):
return ChallengeAddMethod(builder, method)
[docs]def ChallengeEnd(builder): return builder.EndObject()
[docs]def End(builder):
return ChallengeEnd(builder)