GCC Code Coverage Report


Directory: ./
File: src/tools/type-name-helper.hh
Date: 2024-08-13 12:13:25
Exec Total Coverage
Lines: 3 11 27.3%
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
1/2
✓ Branch 2 taken 3 times.
✗ Branch 3 not taken.
3 ADD_KNOWN_TYPE(double)
33
1/2
✓ Branch 2 taken 13 times.
✗ Branch 3 not taken.
13 ADD_KNOWN_TYPE(Vector)
34
1/2
✓ Branch 2 taken 6 times.
✗ Branch 3 not taken.
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 */
44