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