openMSX
Public Member Functions | Friends | List of all members
openmsx::GlobalCliComm Class Referencefinal

#include <GlobalCliComm.hh>

Inheritance diagram for openmsx::GlobalCliComm:
Inheritance graph
[legend]
Collaboration diagram for openmsx::GlobalCliComm:
Collaboration graph
[legend]

Public Member Functions

 GlobalCliComm ()=default
 
 GlobalCliComm (const GlobalCliComm &)=delete
 
 GlobalCliComm (GlobalCliComm &&)=delete
 
GlobalCliCommoperator= (const GlobalCliComm &)=delete
 
GlobalCliCommoperator= (GlobalCliComm &&)=delete
 
 ~GlobalCliComm ()
 
CliListeneraddListener (std::unique_ptr< CliListener > listener)
 
std::unique_ptr< CliListenerremoveListener (CliListener &listener)
 
void setAllowExternalCommands ()
 
void log (LogLevel level, std::string_view message, float fraction) override
 Log a message with a certain priority level.
 
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.
 
- Public Member Functions inherited from openmsx::CliComm
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

- Public Types inherited from openmsx::CliComm
enum class  LogLevel {
  INFO , WARNING , LOGLEVEL_ERROR , PROGRESS ,
  NUM
}
 
enum class  UpdateType {
  LED , SETTING , SETTING_INFO , HARDWARE ,
  PLUG , MEDIA , STATUS , EXTENSION ,
  SOUND_DEVICE , CONNECTOR , DEBUG_UPDT , NUM
}
 
- Static Public Member Functions inherited from openmsx::CliComm
static auto getLevelStrings ()
 
static auto getUpdateStrings ()
 
- Protected Member Functions inherited from openmsx::CliComm
 CliComm ()=default
 
 ~CliComm ()=default
 

Detailed Description

Definition at line 19 of file GlobalCliComm.hh.

Constructor & Destructor Documentation

◆ GlobalCliComm() [1/3]

openmsx::GlobalCliComm::GlobalCliComm ( )
default

◆ GlobalCliComm() [2/3]

openmsx::GlobalCliComm::GlobalCliComm ( const GlobalCliComm )
delete

◆ GlobalCliComm() [3/3]

openmsx::GlobalCliComm::GlobalCliComm ( GlobalCliComm &&  )
delete

◆ ~GlobalCliComm()

openmsx::GlobalCliComm::~GlobalCliComm ( )

Definition at line 13 of file GlobalCliComm.cc.

References openmsx::Thread::isMainThread().

Member Function Documentation

◆ addListener()

CliListener * openmsx::GlobalCliComm::addListener ( std::unique_ptr< CliListener listener)

◆ log()

void openmsx::GlobalCliComm::log ( LogLevel  level,
std::string_view  message,
float  fraction 
)
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().

◆ operator=() [1/2]

GlobalCliComm & openmsx::GlobalCliComm::operator= ( const GlobalCliComm )
delete

◆ operator=() [2/2]

GlobalCliComm & openmsx::GlobalCliComm::operator= ( GlobalCliComm &&  )
delete

◆ removeListener()

std::unique_ptr< CliListener > openmsx::GlobalCliComm::removeListener ( CliListener listener)

◆ setAllowExternalCommands()

void openmsx::GlobalCliComm::setAllowExternalCommands ( )

Definition at line 44 of file GlobalCliComm.cc.

Referenced by openmsx::Reactor::runStartupScripts().

◆ update()

void openmsx::GlobalCliComm::update ( UpdateType  type,
std::string_view  name,
std::string_view  value 
)
overridevirtual

◆ updateFiltered()

void openmsx::GlobalCliComm::updateFiltered ( UpdateType  type,
std::string_view  name,
std::string_view  value 
)
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 92 of file GlobalCliComm.cc.

Friends And Related Symbol Documentation

◆ MSXCliComm

friend class MSXCliComm
friend

Definition at line 55 of file GlobalCliComm.hh.


The documentation for this class was generated from the following files: