GCC Code Coverage Report


Directory: ./
File: include/ndcurves/serialization/registeration.hpp
Date: 2025-06-05 17:24:53
Exec Total Coverage
Lines: 21 21 100.0%
Functions: 6 6 100.0%
Branches: 1 2 50.0%

Line Branch Exec Source
1 /**
2 * \file registeration.h
3 * \brief registeration of class for serialization
4 * \author Pierre Fernbach
5 * \version 0.1
6 * \date 27/11/19
7 *
8 * Boost::serialization need to be aware of all the derived class of the
9 * abstract curve_abc, and thier template parameters. Otherwise we cannot
10 * serialize a pointer to curve_abc. New class should be added at the end and
11 * the order should not change or it will break backward compatibility when
12 * deserializing objects.
13 *
14 */
15
16 #ifndef CURVES_REGISTERATION_H
17 #define CURVES_REGISTERATION_H
18 #include <Eigen/Dense>
19 #include <vector>
20
21 #include "ndcurves/fwd.h"
22
23 /**
24 *This file define a method register_types that
25 * register all the curves class of this package for a boost::Archive
26 * This is used to serialize pointer of the abstract class curve_abc
27 */
28
29 namespace ndcurves {
30 namespace serialization {
31
32 template <class Archive>
33 656 void register_types(Archive& ar, const unsigned int version) {
34 // register derived class
35 656 ar.template register_type<polynomial_t>();
36 656 ar.template register_type<exact_cubic_t>();
37 656 ar.template register_type<bezier_t>();
38 656 ar.template register_type<cubic_hermite_spline_t>();
39 656 ar.template register_type<piecewise_t>();
40
41 656 ar.template register_type<polynomial3_t>();
42 656 ar.template register_type<exact_cubic3_t>();
43 656 ar.template register_type<bezier3_t>();
44 656 ar.template register_type<cubic_hermite_spline3_t>();
45 656 ar.template register_type<piecewise3_t>();
46
47 656 ar.template register_type<SO3Linear_t>();
48 656 ar.template register_type<SE3Curve_t>();
49 656 ar.template register_type<piecewise_SE3_t>();
50
51
1/2
✓ Branch 0 taken 328 times.
✗ Branch 1 not taken.
656 if (version >= 1) {
52 656 ar.template register_type<constant3_t>();
53 656 ar.template register_type<sinusoidal_t>();
54 656 ar.template register_type<constant_t>();
55 656 ar.template register_type<polynomial1_t>();
56 #ifdef CURVES_WITH_PINOCCHIO_SUPPORT
57 656 ar.template register_type<SO3Smooth_t>();
58 #endif
59 }
60 656 }
61
62 } // namespace serialization
63 } // namespace ndcurves
64
65 #endif // CURVES_REGISTERATION_H
66