Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
message.hh
Go to the documentation of this file.
1 //
2 // @rationale Every message class should inherite from this file
3 // the requirements are:
4 // - All the serializable members should be public
5 // - Mandatory overloading of virtual std::string get_type()
6 // - Non-arguments constructor
7 //
8 #pragma once
9 
10 #include <string>
11 
12 namespace eclipse {
13 namespace messages {
14 
15 struct Message {
16  Message() = default;
17  Message(int, int);
18  virtual ~Message () {}
19 
20  virtual std::string get_type() const = 0;
21 
22  int get_origin() const;
23  int get_destination() const;
24 
25  Message& set_origin(int);
27 
29 };
30 
31 }
32 }
int get_origin() const
Definition: message.cc:10
virtual ~Message()
Definition: message.hh:18
Message & set_destination(int)
Definition: message.cc:14
Definition: message.hh:15
int get_destination() const
Definition: message.cc:11
virtual std::string get_type() const =0
int destination
Definition: message.hh:28
Message & set_origin(int)
Definition: message.cc:13
int origin
Definition: message.hh:28