blob: 7cd7fdf390e0187e8ed869f6fcdc1d955652d33e (
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
|
#pragma once
#include "MessagePart.hpp"
#include "User.hpp"
#include <string>
#include <vector>
namespace dchat
{
class Message
{
public:
Message(User *user);
virtual ~Message();
void addText(const std::string &text, bool newLine = true);
void addEmoji(const std::string &url, bool newLine = true);
std::vector<MessagePart*>& getParts();
static Message* buildFromString(User *user, const std::string &str);
const User *user;
private:
std::vector<MessagePart*> messageParts;
};
}
|