2017-04-12 17:46:44 +02:00
|
|
|
#ifndef MESSAGEBUILDER_H
|
|
|
|
#define MESSAGEBUILDER_H
|
|
|
|
|
|
|
|
#include "messages/message.h"
|
2017-04-14 14:08:57 +02:00
|
|
|
#include <ctime>
|
2017-04-12 17:46:44 +02:00
|
|
|
|
2017-04-14 17:52:22 +02:00
|
|
|
namespace chatterino {
|
|
|
|
namespace messages {
|
2017-04-12 17:46:44 +02:00
|
|
|
|
|
|
|
class MessageBuilder
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MessageBuilder();
|
|
|
|
|
|
|
|
SharedMessage build();
|
|
|
|
|
|
|
|
void appendWord(const Word &word);
|
|
|
|
void appendTimestamp();
|
|
|
|
void appendTimestamp(std::time_t time);
|
|
|
|
|
|
|
|
QString matchLink(const QString &string);
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::vector<Word> _words;
|
|
|
|
std::chrono::time_point<std::chrono::system_clock> _parseTime;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // MESSAGEBUILDER_H
|