• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1-- automatically generated by the FlatBuffers compiler, do not modify
2
3-- namespace: NamespaceB
4
5local flatbuffers = require('flatbuffers')
6
7local TableInNestedNS = {} -- the module
8local TableInNestedNS_mt = {} -- the class metatable
9
10function TableInNestedNS.New()
11    local o = {}
12    setmetatable(o, {__index = TableInNestedNS_mt})
13    return o
14end
15function TableInNestedNS.GetRootAsTableInNestedNS(buf, offset)
16    local n = flatbuffers.N.UOffsetT:Unpack(buf, offset)
17    local o = TableInNestedNS.New()
18    o:Init(buf, n + offset)
19    return o
20end
21function TableInNestedNS_mt:Init(buf, pos)
22    self.view = flatbuffers.view.New(buf, pos)
23end
24function TableInNestedNS_mt:Foo()
25    local o = self.view:Offset(4)
26    if o ~= 0 then
27        return self.view:Get(flatbuffers.N.Int32, o + self.view.pos)
28    end
29    return 0
30end
31function TableInNestedNS.Start(builder) builder:StartObject(1) end
32function TableInNestedNS.AddFoo(builder, foo) builder:PrependInt32Slot(0, foo, 0) end
33function TableInNestedNS.End(builder) return builder:EndObject() end
34
35return TableInNestedNS -- return the module