Directory: | ./ |
---|---|
File: | src/Function/FunctionCall_impl.h |
Date: | 2025-03-14 12:18:05 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 11 | 11 | 100.0% |
Branches: | 3 | 3 | 100.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 __FUNCTION_CALL_H_IMPL__ | ||
8 | #define __FUNCTION_CALL_H_IMPL__ | ||
9 | |||
10 | #include "phoenix_type_stream.h" | ||
11 | #include "FunctionCall.h" | ||
12 | #include "phoenix_function_call.h" | ||
13 | |||
14 | ///Default constructor of FunctionCall | ||
15 | /** @param function : function to be called | ||
16 | * @param name : name of the function | ||
17 | */ | ||
18 | template<typename _Callable> | ||
19 | 5 | FunctionCall<_Callable>::FunctionCall(_Callable && function, const PString & name) | |
20 | 5 | :AbstractFunction(name), p_function(function) | |
21 | { | ||
22 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
|
5 | setPrototype(phoenix_getTypeToStr<_Callable>(function)); |
23 | 5 | initialisationFunctionCall(); | |
24 | 5 | } | |
25 | |||
26 | ///Destructor of FunctionCall | ||
27 | template<typename _Callable> | ||
28 | 12 | FunctionCall<_Callable>::~FunctionCall(){ | |
29 | |||
30 | 12 | } | |
31 | |||
32 | ///Call the function with parameter | ||
33 | /** @param[out] log : logger | ||
34 | * @param[out] outputResult : result of the function call | ||
35 | * @param parameter : set of parameters given to the function | ||
36 | * @return true on success, false otherwise | ||
37 | */ | ||
38 | template<typename _Callable> | ||
39 | 3 | bool FunctionCall<_Callable>::call(PLog & log, Data & outputResult, const Data & parameter){ | |
40 | 3 | return phoenix_function_call(log, outputResult, parameter.getValue(), p_function); | |
41 | } | ||
42 | |||
43 | ///Initialisation function of the class FunctionCall | ||
44 | template<typename _Callable> | ||
45 | 5 | void FunctionCall<_Callable>::initialisationFunctionCall(){ | |
46 | |||
47 | 5 | } | |
48 | |||
49 | |||
50 | |||
51 | |||
52 | |||
53 | #endif | ||
54 | |||
55 | |||
56 | |||
57 |