given the following schema, using object APi in C++,
include "link_to_sub.fbs";
namespace My_namespace;
table My_tables {
list : [ namespace.of.Table ] (required, native_inline);
}
root_type My_tables;
In the generated file by flac
, I end up with a vector of TableT
in My_tablesT
, which is expected, defined as:
vector<namespace::of::TableT> list{}
I would like
vector<namespace::of::TableT*> list{}
instead, because I already have TableT
somewhere in memory. That avoids one full copy.
Note: I want to keep using the c++ object api, much easier.
Note2: the context is on-the-fly flatbuffer creation, so they are dynamically created with differing data from already existing sources.
How can I do that, how can I tell flatc to generate a vector of pointers instead ?
Thanks
Got it:
on the field.
Nice.