#include "irc_parse_thread.hpp" #include "connection.hpp" IrcParseThread::IrcParseThread(Connection * connection) noexcept : connection_{connection} {} auto IrcParseThread::priority() const -> priority_type { return 0; } auto IrcParseThread::on_event(Event const& event) -> callback_result { if (auto line_event = dynamic_cast(&event)) { connection_->make_event(parse_irc_message(line_event->line)); return { ThreadOutcome::Continue, EventOutcome::Consume }; } return {}; }