...

Text file src/github.com/google/flatbuffers/tests/MyGame/Example/StructOfStructsOfStructs.lua

Documentation: github.com/google/flatbuffers/tests/MyGame/Example

     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: 23.5.26
     7
     8  Declared by  : //monster_test.fbs
     9  Rooting type : MyGame.Example.Monster (//monster_test.fbs)
    10
    11--]]
    12
    13local flatbuffers = require('flatbuffers')
    14
    15local StructOfStructsOfStructs = {}
    16local mt = {}
    17
    18function StructOfStructsOfStructs.New()
    19  local o = {}
    20  setmetatable(o, {__index = mt})
    21  return o
    22end
    23
    24function mt:Init(buf, pos)
    25  self.view = flatbuffers.view.New(buf, pos)
    26end
    27
    28function mt:A(obj)
    29  obj:Init(self.view.bytes, self.view.pos + 0)
    30  return obj
    31end
    32
    33function 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()
    47end
    48
    49return StructOfStructsOfStructs

View as plain text