Austin Schuh | 2dd86a9 | 2022-09-14 21:19:23 -0700 | [diff] [blame^] | 1 | --[[ MyGame.Example.StructOfStructsOfStructs |
| 2 | |
| 3 | Automatically generated by the FlatBuffers compiler, do not modify. |
| 4 | Or modify. I'm a message, not a cop. |
| 5 | |
| 6 | flatc version: 2.0.8 |
| 7 | |
| 8 | Declared by : //monster_test.fbs |
| 9 | Rooting type : MyGame.Example.Monster (//monster_test.fbs) |
| 10 | |
| 11 | --]] |
| 12 | |
| 13 | local flatbuffers = require('flatbuffers') |
| 14 | |
| 15 | local StructOfStructsOfStructs = {} |
| 16 | local mt = {} |
| 17 | |
| 18 | function StructOfStructsOfStructs.New() |
| 19 | local o = {} |
| 20 | setmetatable(o, {__index = mt}) |
| 21 | return o |
| 22 | end |
| 23 | |
| 24 | function mt:Init(buf, pos) |
| 25 | self.view = flatbuffers.view.New(buf, pos) |
| 26 | end |
| 27 | |
| 28 | function mt:A(obj) |
| 29 | obj:Init(self.view.bytes, self.view.pos + 0) |
| 30 | return obj |
| 31 | end |
| 32 | |
| 33 | function StructOfStructsOfStructs.CreateStructOfStructsOfStructs(builder, a_a_id, a_a_distance, a_b_a, a_b_b, a_c_id, a_c_distance) |
| 34 | builder:Prep(4, 20) |
| 35 | builder:Prep(4, 20) |
| 36 | builder:Prep(4, 8) |
| 37 | builder:PrependUint32(a_c_distance) |
| 38 | builder:PrependUint32(a_c_id) |
| 39 | builder:Prep(2, 4) |
| 40 | builder:Pad(1) |
| 41 | builder:PrependInt8(a_b_b) |
| 42 | builder:PrependInt16(a_b_a) |
| 43 | builder:Prep(4, 8) |
| 44 | builder:PrependUint32(a_a_distance) |
| 45 | builder:PrependUint32(a_a_id) |
| 46 | return builder:Offset() |
| 47 | end |
| 48 | |
| 49 | return StructOfStructsOfStructs |