| 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 | 3 | FunctionCall<_Callable>::FunctionCall(_Callable && function, const PString & name) | |
| 20 | 3 | :AbstractFunction(name), p_function(function) | |
| 21 | { | ||
| 22 |
3/3✓ Branch 0 (3→4) taken 3 times.
✓ Branch 2 (4→5) taken 3 times.
✓ Branch 4 (5→6) taken 3 times.
|
3 | setPrototype(phoenix_getTypeToStr<_Callable>(function)); |
| 23 | 3 | initialisationFunctionCall(); | |
| 24 | 3 | } | |
| 25 | |||
| 26 | ///Destructor of FunctionCall | ||
| 27 | template<typename _Callable> | ||
| 28 | 6 | FunctionCall<_Callable>::~FunctionCall(){ | |
| 29 | |||
| 30 | 6 | } | |
| 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 | 3 | void FunctionCall<_Callable>::initialisationFunctionCall(){ | |
| 46 | |||
| 47 | 3 | } | |
| 48 | |||
| 49 | |||
| 50 | |||
| 51 | |||
| 52 | |||
| 53 | #endif | ||
| 54 | |||
| 55 | |||
| 56 | |||
| 57 |