// // mailbox.h // engine // // Created by Sam Jaffe on 3/16/23. // #pragma once #include #include namespace engine { /** * @brief A generic mailbox class that contains a system to message */ class Mailbox { public: virtual ~Mailbox() = default; virtual void notify(std::string const & str) = 0; template void notifyf(Args &&... args); private: }; template void Mailbox::notifyf(Args &&... args) { std::string str; using ::serializer::to_string; (str.append(to_string(std::forward(args))), ...); notify(str); } }