# automatically generated by the FlatBuffers compiler, do not modify

# namespace: Woekspace

import flatbuffers

class datas(object):
    __slots__ = ['_tab']

    @classmethod
    def GetRootAsdatas(cls, buf, offset):
        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
        x = datas()
        x.Init(buf, n + offset)
        return x

    # datas
    def Init(self, buf, pos):
        self._tab = flatbuffers.table.Table(buf, pos)

    # datas
    def Value(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            x = self._tab.Vector(o)
            x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
            x = self._tab.Indirect(x)
            from entry import entry
            obj = entry()
            obj.Init(self._tab.Bytes, x)
            return obj
        return None

    # datas
    def ValueLength(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

def datasStart(builder): builder.StartObject(1)
def datasAddValue(builder, value): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(value), 0)
def datasStartValueVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def datasEnd(builder): return builder.EndObject()
