Files
BA-AD/baad/FlatData/VoiceCommonExcel.py
Deathemonic 2386ae982d fix: importing
- typo fix at main
- added __all__ at flatdata init
- added missing type hints
- fix formatting
- table service now uses pathlib
- set unused progress to a private variable
- added proper error handling when extracting (probaly need to refactor it)
- fix path not recognizing as path at table extractor
- change the extracting progress bar to one instead of the download like progress bar
2024-07-14 03:50:50 +08:00

91 lines
3.5 KiB
Python

# automatically generated by the FlatBuffers compiler, do not modify
# namespace: FlatData
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class VoiceCommonExcel(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = VoiceCommonExcel()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsVoiceCommonExcel(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# VoiceCommonExcel
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# VoiceCommonExcel
def VoiceEvent_(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
# VoiceCommonExcel
def Rate(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos)
return 0
# VoiceCommonExcel
def VoiceHash(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
a = self._tab.Vector(o)
return self._tab.Get(flatbuffers.number_types.Uint32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
return 0
# VoiceCommonExcel
def VoiceHashAsNumpy(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint32Flags, o)
return 0
# VoiceCommonExcel
def VoiceHashLength(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.VectorLen(o)
return 0
# VoiceCommonExcel
def VoiceHashIsNone(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
return o == 0
def Start(builder): builder.StartObject(3)
def VoiceCommonExcelStart(builder):
"""This method is deprecated. Please switch to Start."""
return Start(builder)
def AddVoiceEvent_(builder, VoiceEvent_): builder.PrependInt32Slot(0, VoiceEvent_, 0)
def VoiceCommonExcelAddVoiceEvent_(builder, VoiceEvent_):
"""This method is deprecated. Please switch to AddVoiceEvent_."""
return AddVoiceEvent_(builder, VoiceEvent_)
def AddRate(builder, Rate): builder.PrependInt64Slot(1, Rate, 0)
def VoiceCommonExcelAddRate(builder, Rate):
"""This method is deprecated. Please switch to AddRate."""
return AddRate(builder, Rate)
def AddVoiceHash(builder, VoiceHash): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(VoiceHash), 0)
def VoiceCommonExcelAddVoiceHash(builder, VoiceHash):
"""This method is deprecated. Please switch to AddVoiceHash."""
return AddVoiceHash(builder, VoiceHash)
def StartVoiceHashVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def VoiceCommonExcelStartVoiceHashVector(builder, numElems):
"""This method is deprecated. Please switch to Start."""
return StartVoiceHashVector(builder, numElems)
def End(builder): return builder.EndObject()
def VoiceCommonExcelEnd(builder):
"""This method is deprecated. Please switch to End."""
return End(builder)