PhoenixSwarm
5.2.0
Library to ease communication between daemons
Toggle main menu visibility
Loading...
Searching...
No Matches
FunctionCall_impl.h
Go to the documentation of this file.
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
using namespace
Swarm
;
15
17
20
template
<
typename
_Callable>
21
FunctionCall<_Callable>::FunctionCall
(_Callable && function,
const
PString & name)
22
:
AbstractFunction
(name),
p_function
(function)
23
{
24
setPrototype
(phoenix_getTypeToStr<_Callable>(function));
25
initialisationFunctionCall
();
26
}
27
29
template
<
typename
_Callable>
30
FunctionCall<_Callable>::~FunctionCall
(){
31
32
}
33
35
40
template
<
typename
_Callable>
41
bool
FunctionCall<_Callable>::call
(PLog & log,
Data
& outputResult,
const
Data
& parameter){
42
return
phoenix_function_call
(log, outputResult, parameter.
getValue
(),
p_function
);
43
}
44
46
template
<
typename
_Callable>
47
void
FunctionCall<_Callable>::initialisationFunctionCall
(){
48
49
}
50
51
52
53
54
55
#endif
56
57
58
FunctionCall.h
Swarm::AbstractFunction::setPrototype
void setPrototype(const PString &prototype)
Set the prototype of the current function.
Definition
AbstractFunction.cpp:40
Swarm::AbstractFunction::AbstractFunction
AbstractFunction(const PString &name)
Default constructor of AbstractFunction.
Definition
AbstractFunction.cpp:14
Swarm::Data
Basic Data exchanged in the swarm.
Definition
Representation.h:22
Swarm::Data::getValue
const DataStreamMsg & getValue() const
Gets the value of the Data.
Definition
Representation.cpp:136
Swarm::FunctionCall::call
virtual bool call(PLog &log, Swarm::Data &outputResult, const Swarm::Data ¶meter)
Call the function with parameter.
Definition
FunctionCall_impl.h:41
Swarm::FunctionCall::FunctionCall
FunctionCall(_Callable &&function, const PString &name)
Default constructor of FunctionCall.
Definition
FunctionCall_impl.h:21
Swarm::FunctionCall::~FunctionCall
virtual ~FunctionCall()
Destructor of FunctionCall.
Definition
FunctionCall_impl.h:30
Swarm::FunctionCall::p_function
_Callable && p_function
Callable function of the FunctionCall.
Definition
FunctionCall.h:25
Swarm::FunctionCall::initialisationFunctionCall
void initialisationFunctionCall()
Initialisation function of the class FunctionCall.
Definition
FunctionCall_impl.h:47
Swarm
Definition
StatSort.h:12
phoenix_function_call.h
phoenix_function_call
bool phoenix_function_call(PLog &log, Swarm::Data &result, const DataStreamMsg &input, R(*func)(T...))
Call the function with message.
Definition
phoenix_function_call.h:57
src
Function
FunctionCall_impl.h
Generated by
1.17.0