mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-13 08:14:31 +00:00
Missing Lua generated files
Change-Id: Id668ade474805dd9c7e108a478db3551d6a62b48
This commit is contained in:
37
tests/namespace_test/NamespaceA/SecondTableInA.lua
Normal file
37
tests/namespace_test/NamespaceA/SecondTableInA.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
-- automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
-- namespace: NamespaceA
|
||||
|
||||
local flatbuffers = require('flatbuffers')
|
||||
|
||||
local SecondTableInA = {} -- the module
|
||||
local SecondTableInA_mt = {} -- the class metatable
|
||||
|
||||
function SecondTableInA.New()
|
||||
local o = {}
|
||||
setmetatable(o, {__index = SecondTableInA_mt})
|
||||
return o
|
||||
end
|
||||
function SecondTableInA.GetRootAsSecondTableInA(buf, offset)
|
||||
local n = flatbuffers.N.UOffsetT:Unpack(buf, offset)
|
||||
local o = SecondTableInA.New()
|
||||
o:Init(buf, n + offset)
|
||||
return o
|
||||
end
|
||||
function SecondTableInA_mt:Init(buf, pos)
|
||||
self.view = flatbuffers.view.New(buf, pos)
|
||||
end
|
||||
function SecondTableInA_mt:ReferToC()
|
||||
local o = self.view:Offset(4)
|
||||
if o ~= 0 then
|
||||
local x = self.view:Indirect(o + self.view.pos)
|
||||
local obj = require('NamespaceC.TableInC').New()
|
||||
obj:Init(self.view.bytes, x)
|
||||
return obj
|
||||
end
|
||||
end
|
||||
function SecondTableInA.Start(builder) builder:StartObject(1) end
|
||||
function SecondTableInA.AddReferToC(builder, referToC) builder:PrependUOffsetTRelativeSlot(0, referToC, 0) end
|
||||
function SecondTableInA.End(builder) return builder:EndObject() end
|
||||
|
||||
return SecondTableInA -- return the module
|
||||
Reference in New Issue
Block a user