1-- automatically generated by the FlatBuffers compiler, do not modify 2 3-- namespace: NamespaceA 4 5local flatbuffers = require('flatbuffers') 6 7local SecondTableInA = {} -- the module 8local SecondTableInA_mt = {} -- the class metatable 9 10function SecondTableInA.New() 11 local o = {} 12 setmetatable(o, {__index = SecondTableInA_mt}) 13 return o 14end 15function SecondTableInA.GetRootAsSecondTableInA(buf, offset) 16 local n = flatbuffers.N.UOffsetT:Unpack(buf, offset) 17 local o = SecondTableInA.New() 18 o:Init(buf, n + offset) 19 return o 20end 21function SecondTableInA_mt:Init(buf, pos) 22 self.view = flatbuffers.view.New(buf, pos) 23end 24function SecondTableInA_mt:ReferToC() 25 local o = self.view:Offset(4) 26 if o ~= 0 then 27 local x = self.view:Indirect(o + self.view.pos) 28 local obj = require('NamespaceC.TableInC').New() 29 obj:Init(self.view.bytes, x) 30 return obj 31 end 32end 33function SecondTableInA.Start(builder) builder:StartObject(1) end 34function SecondTableInA.AddReferToC(builder, referToC) builder:PrependUOffsetTRelativeSlot(0, referToC, 0) end 35function SecondTableInA.End(builder) return builder:EndObject() end 36 37return SecondTableInA -- return the module