GCC Code Coverage Report


Directory: ./
File: src/nearest-neighbor/serialization.cc
Date: 2024-12-13 16:14:03
Exec Total Coverage
Lines: 9 9 100.0%
Branches: 2 4 50.0%

Line Branch Exec Source
1 #include "basic.hh"
2 // #include "k-d-tree.hh"
3
4 #include <hpp/core/distance.hh>
5 #include <hpp/util/serialization.hh>
6
7 18 BOOST_CLASS_EXPORT(hpp::core::nearestNeighbor::Basic)
8 // BOOST_CLASS_EXPORT(hpp::core::nearestNeighbor::KDTree)
9
10 namespace hpp {
11 namespace core {
12
13 template <typename Archive>
14 12 inline void NearestNeighbor::serialize(Archive& ar,
15 const unsigned int version) {
16 (void)version;
17 (void)ar;
18 12 }
19
20 HPP_SERIALIZATION_IMPLEMENT(NearestNeighbor);
21
22 namespace nearestNeighbor {
23
24 template <typename Archive>
25 12 inline void Basic::serialize(Archive& ar, const unsigned int version) {
26 (void)version;
27
1/2
✓ Branch 1 taken 6 times.
✗ Branch 2 not taken.
12 ar& boost::serialization::make_nvp(
28 12 "base", boost::serialization::base_object<NearestNeighbor>(*this));
29
1/2
✓ Branch 1 taken 6 times.
✗ Branch 2 not taken.
12 ar& boost::serialization::make_nvp("distance_",
30 12 const_cast<DistancePtr_t&>(distance_));
31 12 }
32
33 HPP_SERIALIZATION_IMPLEMENT(Basic);
34
35 /*
36 template <typename Archive>
37 inline void KDTree::serialize(Archive& ar, const unsigned int version)
38 {
39 throw std::logic_error("nearestNeighbor::KDTree not serializable.");
40 (void) version;
41 ar & boost::serialization::make_nvp("base",
42 boost::serialization::base_object<NearestNeighbor>(*this)); ar &
43 BOOST_SERIALIZATION_NVP(distance_);
44 }
45
46 HPP_SERIALIZATION_IMPLEMENT(KDTree);
47 */
48
49 } // namespace nearestNeighbor
50 } // namespace core
51 } // namespace hpp
52