GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: src/tools/type-name-helper.hh Lines: 3 11 27.3 %
Date: 2023-03-13 12:09:37 Branches: 3 20 15.0 %

Line Branch Exec Source
1
/*
2
 * Copyright 2010,
3
 * François Bleibel,
4
 * Olivier Stasse,
5
 * Nicolas Mansard
6
 * Joseph Mirabel
7
 *
8
 * CNRS/AIST
9
 *
10
 */
11
12
#include <sot/core/matrix-geometry.hh>
13
14
namespace dynamicgraph {
15
namespace sot {
16
template <typename TypeRef>
17
struct TypeNameHelper {
18
  static inline std::string typeName();
19
};
20
template <typename TypeRef>
21
inline std::string TypeNameHelper<TypeRef>::typeName() {
22
  return "unspecified";
23
}
24
25
#define ADD_KNOWN_TYPE(typeid)                            \
26
  template <>                                             \
27
  inline std::string TypeNameHelper<typeid>::typeName() { \
28
    return #typeid;                                       \
29
  }
30
31
ADD_KNOWN_TYPE(bool)
32
3
ADD_KNOWN_TYPE(double)
33
13
ADD_KNOWN_TYPE(Vector)
34
6
ADD_KNOWN_TYPE(Matrix)
35
ADD_KNOWN_TYPE(MatrixRotation)
36
ADD_KNOWN_TYPE(MatrixTwist)
37
ADD_KNOWN_TYPE(MatrixHomogeneous)
38
ADD_KNOWN_TYPE(VectorQuaternion)
39
ADD_KNOWN_TYPE(VectorRollPitchYaw)
40
41
#undef ADD_KNOWN_TYPE
42
} /* namespace sot */
43
} /* namespace dynamicgraph */