heremaps / flatdata

Write-once, read-many, minimal overhead binary structured file format.
Apache License 2.0
180 stars 28 forks source link

Add support for serialization of a single struct. #23

Closed boxdot closed 6 years ago

boxdot commented 6 years ago

Technically, we have this already. See https://github.com/heremaps/flatdata/pull/21/files/4d14db178ea36e9a96fa945996b9d7a0fe156760#diff-03983e4479e8a13251972767b3d281c1:

flatdata::Vector< SomeStruct > data( 1 );
auto obj = data[ 0 ];
// set fields of obj
builder.set_some_struct( obj );

As discussed, it would make sense to add support for that, such we don't have to use a workaround with Vector.

boxdot commented 6 years ago

Duplicate of #22.