...

Text file src/github.com/google/flatbuffers/goldens/nim/Galaxy.nim

Documentation: github.com/google/flatbuffers/goldens/nim

     1#[ Galaxy
     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.9
     6
     7  Declared by  : //basic.fbs
     8  Rooting type : Universe (//basic.fbs)
     9]#
    10
    11import flatbuffers
    12
    13type Galaxy* = object of FlatObj
    14func numStars*(self: Galaxy): int64 =
    15  let o = self.tab.Offset(4)
    16  if o != 0:
    17    return Get[int64](self.tab, self.tab.Pos + o)
    18  return 0
    19func `numStars=`*(self: var Galaxy, n: int64): bool =
    20  return self.tab.MutateSlot(4, n)
    21proc GalaxyStart*(builder: var Builder) =
    22  builder.StartObject(1)
    23proc GalaxyAddnumStars*(builder: var Builder, numStars: int64) =
    24  builder.PrependSlot(0, numStars, default(int64))
    25proc GalaxyEnd*(builder: var Builder): uoffset =
    26  return builder.EndObject()

View as plain text