I am trying to use the following method of building a table, as taken from the flatbuffers tutorial:
MonsterBuilder monster_builder(builder);
monster_builder.add_pos(&pos);
monster_builder.add_hp(hp);
But having done this for my root table I am unsure if I need to call .Finish()
before adding it to the table that then contains the table above.
Is anyone able to provide me with an example of how usage of the add_member
commands may be used in nested tables?
You call
.Finish()
on any tables you create with a table builder. You call.Finish(root)
on yourFlatBufferBuilder
instance only once at the end to finish construction of the buffer.