Skip to content

Serialization

Jeremie Deray requested to merge serialization into master

Adding serialization to a couple base classes and 'simple' derived classes (simple as in fully public).
The serialization scheme allows for 'non-intrusive' serialization in the sense that it does not requires to intrusively modify a class so that you are stuck with the library. Later update for more complex class (e.g. with private members) will require the addition of a library-agnostic intruder into such classes.
Thus if one does not have the serialization library, wolf still compiles.

This rely on the cereal library ( can't past a link, google : github cereal serialization ).

It add function 'wolf::save' and 'wolf::load'.

Both works quite simply, given a full path it saves/loads the the object(s) to the file and vice-verse.
It automatically deduce the format to save as from the file name extension.
So far it handles 'xml' ,'json' and 'binary'.

See the gtest for usage example.

This is somewhat similar to the early dev for instantiating Param classes from yaml file, but this is simpler, much more powerful and support at as now 3 file formats including 2 that are human readable ! (see attached file).

params_odom3d_ptr_serialization.json

Edited by Jeremie Deray

Merge request reports