PhoenixSwarm  3.5.0
Library to ease communication between daemons
Loading...
Searching...
No Matches
AbstractFunction.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 __ABSTRACTFUNCTION_H__
8#define __ABSTRACTFUNCTION_H__
9
10#include "PLog.h"
11#include "representation_def.h"
12
15 public:
16 AbstractFunction(const PString & name);
17 virtual ~AbstractFunction();
18
19 void setName(const PString & name);
20 const PString & getName() const;
21
22 void setPrototype(const PString & prototype);
23 const PString & getPrototype() const;
24
25 virtual bool call(PLog & log, Data & outputResult, const Data & parameter) = 0;
26
27 private:
28 void initialisationAbstractFunction(const PString & name);
29
31 PString p_name;
33 PString p_prototype;
34};
35
36
37
38#endif
39
virtual bool call(PLog &log, Data &outputResult, const Data &parameter)=0
const PString & getPrototype() const
Get the prototype of the current function.
PString p_prototype
Prototype of the function.
PString p_name
Name of the function.
const PString & getName() const
Name of the function.
void initialisationAbstractFunction(const PString &name)
Initialisation function of the class AbstractFunction.
void setPrototype(const PString &prototype)
Set the prototype of the current function.
void setName(const PString &name)
Set the name of the function.
virtual ~AbstractFunction()
Destructor of AbstractFunction.
AbstractFunction(const PString &name)
Default constructor of AbstractFunction.
Basic Data exchanged in the swarm.