GCC Code Coverage Report


Directory: ./
File: tmp_project/PhoenixTypeStream/src/phoenix_composeType_impl.h
Date: 2025-03-14 12:18:05
Exec Total Coverage
Lines: 6 6 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 /***************************************
2 Auteur : Pierre Aubert
3 Mail : pierre.aubert@lapp.in2p3.fr
4 Licence : CeCILL-C
5 ****************************************/
6
7 #ifndef __PHOENIX_COMPOSETYPE_IMPL_H__
8 #define __PHOENIX_COMPOSETYPE_IMPL_H__
9
10 #include "phoenix_composeType.h"
11
12 ///Get the corresponding type of a string
13 /** @return corresponding string
14 */
15 template<typename T>
16 100 std::string phoenix_getTypeToStr(){
17 100 return TypeStream<T >::getTypeToStr();
18 }
19
20 ///Get the corresponding type of a string
21 /** @param data : parameter used to get its type
22 * @return corresponding string
23 */
24 template<typename T>
25 23 std::string phoenix_getTypeToStr(const T & data){
26 23 return phoenix_getTypeToStr<T>();
27 }
28
29 ///Convert a function prototype into a string
30 /** @param func : function to be called
31 * @return corresponding type name as string
32 */
33 template <typename R, typename... T>
34 4 std::string phoenix_getTypeToStr(R (*func)(T...)){
35 4 return phoenix_getTypeToStr<R>() + " | " + TypeStream<std::tuple<T... > >::getTypeToStr();
36 }
37
38
39 #endif
40