Commit 6559791b authored by Pierre Fernbach's avatar Pierre Fernbach Committed by Guilhem Saurel
Browse files

serialization: register_types now take an archive version as argument

parent 562c7b74
......@@ -137,7 +137,7 @@ struct curve_abc : std::unary_function<Time, Point>, public serialization::Seria
friend class boost::serialization::access;
template <class Archive>
void serialize(Archive& ar, const unsigned int version) {
serialization::register_types<Archive>(ar, version);
if (version) {
// Do something depending on version ?
......@@ -30,24 +30,26 @@ namespace curves {
namespace serialization {
template <class Archive>
void register_types(Archive& ar) {
void register_types(Archive& ar, const unsigned int version) {
// register derived class
ar.template register_type<polynomial_t>();
ar.template register_type<exact_cubic_t>();
ar.template register_type<bezier_t>();
ar.template register_type<constant_t>();
ar.template register_type<cubic_hermite_spline_t>();
ar.template register_type<piecewise_t>();
ar.template register_type<polynomial3_t>();
ar.template register_type<exact_cubic3_t>();
ar.template register_type<bezier3_t>();
ar.template register_type<constant3_t>();
ar.template register_type<cubic_hermite_spline3_t>();
ar.template register_type<piecewise3_t>();
ar.template register_type<SO3Linear_t>();
ar.template register_type<SE3Curve_t>();
ar.template register_type<sinusoidal_t>();
ar.template register_type<piecewise_SE3_t>();
if(version >= 1){
ar.template register_type<constant3_t>();
ar.template register_type<sinusoidal_t>();
ar.template register_type<constant_t>();
} // namespace serialization
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment