openMSX
MSXCliComm.hh
Go to the documentation of this file.
1#ifndef MSXCLICOMM_HH
2#define MSXCLICOMM_HH
3
4#include "CliComm.hh"
5#include "hash_map.hh"
6#include "xxhash.hh"
7#include <array>
8
9namespace openmsx {
10
11class MSXMotherBoard;
12class GlobalCliComm;
13
14class MSXCliComm final : public CliComm
15{
16public:
17 MSXCliComm(MSXMotherBoard& motherBoard, GlobalCliComm& cliComm);
18
19 void log(LogLevel level, std::string_view message, float fraction) override;
20 void update(UpdateType type, std::string_view name,
21 std::string_view value) override;
22 void updateFiltered(UpdateType type, std::string_view name,
23 std::string_view value) override;
24
25 // enable/disable message suppression
26 void setSuppressMessages(bool enable);
27
28private:
29 MSXMotherBoard& motherBoard;
30 GlobalCliComm& cliComm;
31 std::array<hash_map<std::string, std::string, XXHasher>, NUM_UPDATES> prevValues;
32 bool suppressMessages = false;
33};
34
35} // namespace openmsx
36
37#endif
void updateFiltered(UpdateType type, std::string_view name, std::string_view value) override
Same as update(), but checks that the value for type-name is the same as in the previous call.
Definition MSXCliComm.cc:27
void update(UpdateType type, std::string_view name, std::string_view value) override
Definition MSXCliComm.cc:21
void setSuppressMessages(bool enable)
Definition MSXCliComm.cc:41
void log(LogLevel level, std::string_view message, float fraction) override
Log a message with a certain priority level.
Definition MSXCliComm.cc:14
This file implemented 3 utility functions:
Definition Autofire.cc:9