mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-05 12:27:05 +00:00
fixed bfbs gen to pass extra options (#7949)
This commit is contained in:
26
goldens/nim/Galaxy.nim
Normal file
26
goldens/nim/Galaxy.nim
Normal file
@@ -0,0 +1,26 @@
|
||||
#[ Galaxy
|
||||
Automatically generated by the FlatBuffers compiler, do not modify.
|
||||
Or modify. I'm a message, not a cop.
|
||||
|
||||
flatc version: 23.5.9
|
||||
|
||||
Declared by : //basic.fbs
|
||||
Rooting type : Universe (//basic.fbs)
|
||||
]#
|
||||
|
||||
import flatbuffers
|
||||
|
||||
type Galaxy* = object of FlatObj
|
||||
func numStars*(self: Galaxy): int64 =
|
||||
let o = self.tab.Offset(4)
|
||||
if o != 0:
|
||||
return Get[int64](self.tab, self.tab.Pos + o)
|
||||
return 0
|
||||
func `numStars=`*(self: var Galaxy, n: int64): bool =
|
||||
return self.tab.MutateSlot(4, n)
|
||||
proc GalaxyStart*(builder: var Builder) =
|
||||
builder.StartObject(1)
|
||||
proc GalaxyAddnumStars*(builder: var Builder, numStars: int64) =
|
||||
builder.PrependSlot(0, numStars, default(int64))
|
||||
proc GalaxyEnd*(builder: var Builder): uoffset =
|
||||
return builder.EndObject()
|
||||
Reference in New Issue
Block a user