openMSX
|
#include <GlobalCliComm.hh>
Public Member Functions | |
GlobalCliComm (const GlobalCliComm &)=delete | |
GlobalCliComm & | operator= (const GlobalCliComm &)=delete |
GlobalCliComm ()=default | |
~GlobalCliComm () | |
CliListener * | addListener (std::unique_ptr< CliListener > listener) |
std::unique_ptr< CliListener > | removeListener (CliListener &listener) |
void | setAllowExternalCommands () |
void | log (LogLevel level, std::string_view message, float fraction) override |
Log a message with a certain priority level. More... | |
void | update (UpdateType type, std::string_view name, std::string_view value) override |
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. More... | |
![]() | |
virtual void | log (LogLevel level, std::string_view message, float fraction=0.0f)=0 |
Log a message with a certain priority level. More... | |
virtual void | update (UpdateType type, std::string_view name, std::string_view value)=0 |
virtual void | updateFiltered (UpdateType type, std::string_view name, std::string_view value)=0 |
Same as update(), but checks that the value for type-name is the same as in the previous call. More... | |
void | printInfo (std::string_view message) |
void | printWarning (std::string_view message) |
void | printError (std::string_view message) |
void | printProgress (std::string_view message, float fraction) |
void | printInfo (const char *message) |
void | printWarning (const char *message) |
void | printError (const char *message) |
void | printProgress (const char *message, float fraction) |
template<typename... Args> | |
void | printInfo (Args &&...args) |
template<typename... Args> | |
void | printWarning (Args &&...args) |
template<typename... Args> | |
void | printError (Args &&...args) |
Friends | |
class | MSXCliComm |
Additional Inherited Members | |
![]() | |
enum | LogLevel { INFO , WARNING , LOGLEVEL_ERROR , PROGRESS , NUM_LEVELS } |
enum | UpdateType { LED , SETTING , SETTING_INFO , HARDWARE , PLUG , MEDIA , STATUS , EXTENSION , SOUND_DEVICE , CONNECTOR , DEBUG_UPDT , NUM_UPDATES } |
![]() | |
static std::span< const std::string_view, NUM_LEVELS > | getLevelStrings () |
static std::span< const std::string_view, NUM_UPDATES > | getUpdateStrings () |
![]() | |
CliComm ()=default | |
~CliComm ()=default | |
Definition at line 16 of file GlobalCliComm.hh.
|
delete |
|
default |
openmsx::GlobalCliComm::~GlobalCliComm | ( | ) |
Definition at line 13 of file GlobalCliComm.cc.
References openmsx::Thread::isMainThread().
CliListener * openmsx::GlobalCliComm::addListener | ( | std::unique_ptr< CliListener > | listener | ) |
Definition at line 19 of file GlobalCliComm.cc.
Referenced by openmsx::CommandLineParser::parse(), and openmsx::TclCallbackMessages::TclCallbackMessages().
|
overridevirtual |
Log a message with a certain priority level.
The 'fraction' parameter is only meaningful for 'level=PROGRESS'. See printProgress() for details.
Implements openmsx::CliComm.
Definition at line 55 of file GlobalCliComm.cc.
References openmsx::Thread::isMainThread(), and openmsx::CliComm::PROGRESS.
Referenced by openmsx::MSXCliComm::log().
|
delete |
std::unique_ptr< CliListener > openmsx::GlobalCliComm::removeListener | ( | CliListener & | listener | ) |
Definition at line 33 of file GlobalCliComm.cc.
References move_pop_back(), and rfind_unguarded().
Referenced by openmsx::ImGuiMessages::~ImGuiMessages(), and openmsx::TclCallbackMessages::~TclCallbackMessages().
void openmsx::GlobalCliComm::setAllowExternalCommands | ( | ) |
Definition at line 44 of file GlobalCliComm.cc.
Referenced by openmsx::Reactor::run().
|
overridevirtual |
Implements openmsx::CliComm.
Definition at line 87 of file GlobalCliComm.cc.
References openmsx::CliComm::NUM_UPDATES.
Referenced by openmsx::AddRemoveUpdate::AddRemoveUpdate(), and openmsx::AddRemoveUpdate::~AddRemoveUpdate().
|
overridevirtual |
Same as update(), but checks that the value for type-name is the same as in the previous call.
If so do nothing.
Implements openmsx::CliComm.
Definition at line 93 of file GlobalCliComm.cc.
References openmsx::CliComm::NUM_UPDATES.
|
friend |
Definition at line 51 of file GlobalCliComm.hh.