-
Notifications
You must be signed in to change notification settings - Fork 1
/
publisher.hpp
42 lines (34 loc) · 1.2 KB
/
publisher.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//===============================================================================//
// Name : publisher.hpp
// Author(s) : Barbara Bruno
// Affiliation : University of Genova, Italy - dept. DIBRIS
// Version : 1.0
// Description : Interface for the publishing middleware (virtual base class)
//===============================================================================//
#include <string>
using namespace std;
#ifndef PUBLISHER_HPP_
#define PUBLISHER_HPP_
//! base class "Publisher" for the interface to the information publishing middleware
class Publisher
{
public:
string name; //!< name of the middleware
//! constructor
//! @param[in] n name of the device
Publisher(string n)
{
name = n;
//DEBUG:cout<<"Publisher: " <<name <<endl;
}
//! print publishing middleware information
void printInfo()
{
cout<<"Publisher: " <<name <<endl;
}
//! publish information
//! @param[in] key key of the information to be published
//! @param[in] value value of the information to be published
virtual void publish(const string key, const string value) = 0;
};
#endif