-- automatically generated by the FlatBuffers compiler, do not modify

-- namespace: fb

local flatbuffers = require('flatbuffers')

local skillconfigTB = {} -- the module
local skillconfigTB_mt = {} -- the class metatable

function skillconfigTB.New()
    local o = {}
    setmetatable(o, {__index = skillconfigTB_mt})
    return o
end
function skillconfigTB.GetRootAsskillconfigTB(buf, offset)
    local n = flatbuffers.N.UOffsetT:Unpack(buf, offset)
    local o = skillconfigTB.New()
    o:Init(buf, n + offset)
    return o
end
function skillconfigTB_mt:Init(buf, pos)
    self.view = flatbuffers.view.New(buf, pos)
end
function skillconfigTB_mt:SkillconfigTRS(j)
    local o = self.view:Offset(4)
    if o ~= 0 then
        local x = self.view:Vector(o)
        x = x + ((j-1) * 4)
        x = self.view:Indirect(x)
        local obj = require('fb.skillconfigTR').New()
        obj:Init(self.view.bytes, x)
        return obj
    end
end
function skillconfigTB_mt:SkillconfigTRSLength()
    local o = self.view:Offset(4)
    if o ~= 0 then
        return self.view:VectorLen(o)
    end
    return 0
end
function skillconfigTB.Start(builder) builder:StartObject(1) end
function skillconfigTB.AddSkillconfigTRS(builder, skillconfigTRS) builder:PrependUOffsetTRelativeSlot(0, skillconfigTRS, 0) end
function skillconfigTB.StartSkillconfigTRSVector(builder, numElems) return builder:StartVector(4, numElems, 4) end
function skillconfigTB.End(builder) return builder:EndObject() end

return skillconfigTB -- return the module