diff options
Diffstat (limited to 'src/IOManager.hpp')
| -rw-r--r-- | src/IOManager.hpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/IOManager.hpp b/src/IOManager.hpp new file mode 100644 index 0000000..ba741ff --- /dev/null +++ b/src/IOManager.hpp @@ -0,0 +1,30 @@ +#pragma once + +#include "chatManager.hpp" +#include "format.hpp" +#include <optional> + +class CIOManager { + public: + CIOManager(); + ~CIOManager(); + + struct SLog { + eFormatType type; + std::string log; + }; + struct SIO { + // cannot have both at once + std::optional<CChatManager::SMessage> msg; + std::optional<SLog> log; + }; + + const std::vector<SIO> &getIO() const; + void addLog(const SLog &log); + + private: + std::vector<SIO> m_vIO; + + friend class CChatManager; +}; +inline std::unique_ptr<CIOManager> g_pIOManager; |
