blob: d1d891d7836f2262c2709f1290ad6f2dc32420de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#pragma once
#include "../core/chatManager.hpp"
#include "../debug/format.hpp"
#include <optional>
class CIOManager {
public:
CIOManager();
~CIOManager();
struct SLog {
eFormatType type;
std::string log;
};
struct SIO {
// once a time
std::optional<CChatManager::SMessage> msg = std::nullopt;
std::optional<SLog> log = std::nullopt;
std::optional<std::pair<std::string, std::string>> custom = std::nullopt;
};
const std::vector<SIO> &getIO() const;
void addLog(const SLog &log);
void addMessage(const CChatManager::SMessage &msg);
void addCustom(const std::pair<std::string, std::string> &custom);
private:
std::vector<SIO> m_vIO;
friend class CChatManager;
};
inline std::unique_ptr<CIOManager> g_pIOManager;
|