blob: 44174ec2b27402e38a0b325ae6c674059db298bb (
plain)
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
|
#include "../include/Message.hpp"
using namespace std;
namespace dchat
{
Message::Message(User *_user) :
user(_user)
{
}
Message::~Message()
{
for(MessagePart *messagePart : messageParts)
{
delete messagePart;
}
}
void Message::addText(const string &text)
{
messageParts.push_back(new MessagePartText(text));
}
vector<MessagePart*>& Message::getParts()
{
return messageParts;
}
}
|