-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMessage.h
47 lines (34 loc) · 848 Bytes
/
Message.h
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
43
44
45
46
47
//
// Created by Christian Di buó on 04/02/22.
//
#ifndef CHAT_LABORATORIO_MESSAGE_H
#define CHAT_LABORATORIO_MESSAGE_H
#include <iostream>
class Message {
public:
Message(const std::string& text, const std::string& receiver,const std::string& sender, bool read=false)
:text(text), receiver(receiver), sender(sender), read(read){}
~Message(){}
const std::string &getSender() const {
return sender;
}
const std::string &getReceiver() const {
return receiver;
}
const std::string &getText() const {
return text;
}
bool isRead() const {
return read;
}
void setRead(bool read) {
Message::read = read;
}
private:
std::string sender;
std::string receiver;
std::string text;
bool read;
public:
};
#endif //CHAT_LABORATORIO_MESSAGE_H