...

Text file src/github.com/google/flatbuffers/tests/MyGame/Example/StructOfStructs.nim

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

     1#[ MyGame.Example.StructOfStructs
     2  Automatically generated by the FlatBuffers compiler, do not modify.
     3  Or modify. I'm a message, not a cop.
     4
     5  flatc version: 23.5.26
     6
     7  Declared by  : 
     8  Rooting type : MyGame.Example.Monster ()
     9]#
    10
    11import Ability as MyGame_Example_Ability
    12import Test as MyGame_Example_Test
    13import flatbuffers
    14
    15type StructOfStructs* = object of FlatObj
    16func a*(self: StructOfStructs): MyGame_Example_Ability.Ability =
    17  return MyGame_Example_Ability.Ability(tab: Vtable(Bytes: self.tab.Bytes, Pos: self.tab.Pos + 0))
    18func b*(self: StructOfStructs): MyGame_Example_Test.Test =
    19  return MyGame_Example_Test.Test(tab: Vtable(Bytes: self.tab.Bytes, Pos: self.tab.Pos + 8))
    20func c*(self: StructOfStructs): MyGame_Example_Ability.Ability =
    21  return MyGame_Example_Ability.Ability(tab: Vtable(Bytes: self.tab.Bytes, Pos: self.tab.Pos + 12))
    22proc StructOfStructsCreate*(self: var Builder, a_id: uint32, a_distance: uint32, b_a: int16, b_b: int8, c_id: uint32, c_distance: uint32): uoffset =
    23  self.Prep(4, 20)
    24  self.Prep(4, 8)
    25  self.Prepend(c_distance)
    26  self.Prepend(c_id)
    27  self.Prep(2, 4)
    28  self.Pad(1)
    29  self.Prepend(b_b)
    30  self.Prepend(b_a)
    31  self.Prep(4, 8)
    32  self.Prepend(a_distance)
    33  self.Prepend(a_id)
    34  return self.Offset()

View as plain text