PhoenixSwarm  5.1.1
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"
14
17 public:
18 AbstractDataFunction(const PString & name);
19 virtual ~AbstractDataFunction();
20
21 void setName(const PString & name);
22 const PString & getName() const;
23
24 void setPrototype(const PString & prototype);
25 const PString & getPrototype() const;
26
27 virtual bool call(PLog & log, const Swarm::Data & data) = 0;
28
29 private:
30 void initialisationAbstractDataFunction(const PString & name);
31
33 PString p_name;
35 PString p_prototype;
36};
37
38
39
40#endif
41
Abstract function definition which will be callable in Daemon.
const PString & getPrototype() const
Get the prototype of the current 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 Swarm::Data &data)=0
void setName(const PString &name)
Set the name of the function.
virtual ~AbstractDataFunction()
Destructor of AbstractDataFunction.
void initialisationAbstractDataFunction(const PString &name)
Initialisation function of the class AbstractDataFunction.
PString p_prototype
Prototype of the function.
PString p_name
Name of the function.
AbstractDataFunction(const PString &name)
Default constructor of AbstractDataFunction.
Basic Data exchanged in the swarm.