envire / envire-envire_core

Core part for the Environment Representation library
BSD 2-Clause "Simplified" License
7 stars 13 forks source link

first implementation of the serialization #8

Closed saarnold closed 8 years ago

saarnold commented 8 years ago

This is the first implementation of the serialization based on boost.

It involves to switch from intrusive to shared pointers as default smart pointer. The background is that shared pointers are directly supported by boost serialization. And as far as I know it would also be more compatible to mars right?

There are two new macros which allows the BaseItem to be automatically serialized. Those are currently part of the existing macros, which might force the user to implement a serialize method for the data type that is used in the Item. We could also make this optional. The existing macros to define a new envire Item where extended by a data type parameter.

I'll extend the implementation by documentation and more unit tests in the next days.

Also the automatic lookup of the plugin in case it was not loaded yet is missing.

jhidalgocarrio commented 8 years ago

Are we moving to shared pointers for Items?

saarnold commented 8 years ago

Boost serialization directly supports shared pointers. We could write a support for intrusive pointers, but since we currently don't have the requirement for them, we could also switch to shared pointers.

jhidalgocarrio commented 8 years ago

Alright! I fine with it.