#pragma once #include "messages/message.hpp" #include #include namespace chatterino { namespace messages { class MessageBuilder { public: MessageBuilder(); MessagePtr getMessage(); void setHighlight(bool value); void appendElement(MessageElement *element); // typename std::enable_if::value, T>::type template T *append(Args &&... args) { static_assert(std::is_base_of::value, "T must extend MessageElement"); T *element = new T(std::forward(args)...); this->appendElement(element); return element; } void appendTimestamp(); void appendTimestamp(const QTime &time); QString matchLink(const QString &string); QString originalMessage; protected: MessagePtr message; }; } // namespace messages } // namespace chatterino