Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame^] | 1 | -- automatically generated by the FlatBuffers compiler, do not modify |
| 2 | |
| 3 | -- namespace: NamespaceB |
| 4 | |
| 5 | local flatbuffers = require('flatbuffers') |
| 6 | |
| 7 | local StructInNestedNS = {} -- the module |
| 8 | local StructInNestedNS_mt = {} -- the class metatable |
| 9 | |
| 10 | function StructInNestedNS.New() |
| 11 | local o = {} |
| 12 | setmetatable(o, {__index = StructInNestedNS_mt}) |
| 13 | return o |
| 14 | end |
| 15 | function StructInNestedNS_mt:Init(buf, pos) |
| 16 | self.view = flatbuffers.view.New(buf, pos) |
| 17 | end |
| 18 | function StructInNestedNS_mt:A() |
| 19 | return self.view:Get(flatbuffers.N.Int32, self.view.pos + 0) |
| 20 | end |
| 21 | function StructInNestedNS_mt:B() |
| 22 | return self.view:Get(flatbuffers.N.Int32, self.view.pos + 4) |
| 23 | end |
| 24 | function StructInNestedNS.CreateStructInNestedNS(builder, a, b) |
| 25 | builder:Prep(4, 8) |
| 26 | builder:PrependInt32(b) |
| 27 | builder:PrependInt32(a) |
| 28 | return builder:Offset() |
| 29 | end |
| 30 | |
| 31 | return StructInNestedNS -- return the module |