I have a simulator type program where I want to be able to save (and load) the 
current simulation state using Boost serialization.

The program, as with most programs, consists of a part that is static during 
run-time and a part that is dynamic.

Ideally I would like to serialize only the dynamic part but this however raises 
the following problem.

If a serialized object in the dynamic part contains a pointer to a 
non-seralized object in the static part then how do I deal with that. Clearly 
the address cannot be serialized since it may change between builds and even 
between runs (ASLR). The program does contain a 'registry' though where all 
relevant static objects are registered with a unique identifier.

So question is would it somehow be possible to have Boost serialization use 
this registry to serialize the unique identifier instead of trying to serialize 
the entire object when one of those pointers are serialized?

As far as I can tell the documentation does not mention this situation and 
extensive web searching yields very little as well.

Any advice appreciated!

-Markus
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
https://lists.boost.org/mailman/listinfo.cgi/boost-users

Reply via email to