diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-06-12 21:41:41 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-06-13 20:22:51 +0800 |
| commit | 6f7b994684032060f0a2d7af82f4f3572293b8d6 (patch) | |
| tree | 793d328cbcd6761365267550b55db45aee9b21fc /src/io/IOManager.cpp | |
| parent | 6a51ab4525c59e9fe2bdbd92493019b0a98c6b94 (diff) | |
internal!: organized internal structure, using cmake now
Diffstat (limited to 'src/io/IOManager.cpp')
| -rw-r--r-- | src/io/IOManager.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/io/IOManager.cpp b/src/io/IOManager.cpp new file mode 100644 index 0000000..be29adf --- /dev/null +++ b/src/io/IOManager.cpp @@ -0,0 +1,34 @@ +#include "IOManager.hpp" +#include "inputManager.hpp" +#include "../debug/log.hpp" + +CIOManager::CIOManager() { + log(LOG, "IOManager: initialized"); +} + +CIOManager::~CIOManager() { + m_vIO.clear(); + log(SYS, "IOManager: bye"); +} + +const std::vector<CIOManager::SIO> &CIOManager::getIO() const { + return m_vIO; +} + +void CIOManager::addLog(const SLog &log) { + m_vIO.push_back({.log = log}); + if (g_pInputManager) + g_pInputManager->updateIO(); +} + +void CIOManager::addMessage(const CChatManager::SMessage &msg) { + m_vIO.push_back({.msg = msg}); + if (g_pInputManager) + g_pInputManager->updateIO(); +} + +void CIOManager::addCustom(const std::pair<std::string, std::string> &custom) { + m_vIO.push_back({.custom = custom}); + if (g_pInputManager) + g_pInputManager->updateIO(); +} |
