openMSX
|
#include <MSXCommandController.hh>
Public Member Functions | |
MSXCommandController (GlobalCommandController &globalCommandController, Reactor &reactor, MSXMotherBoard &motherboard, MSXEventDistributor &msxEventDistributor, const std::string &machineID) | |
MSXCommandController (const MSXCommandController &)=delete | |
MSXCommandController (MSXCommandController &&)=delete | |
MSXCommandController & | operator= (const MSXCommandController &)=delete |
MSXCommandController & | operator= (MSXCommandController &&)=delete |
~MSXCommandController () | |
GlobalCommandController & | getGlobalCommandController () |
InfoCommand & | getMachineInfoCommand () |
MSXMotherBoard & | getMSXMotherBoard () const |
const std::string & | getPrefix () const |
Command * | findCommand (std::string_view name) const |
Setting * | findSetting (std::string_view name) const |
bool | isActive () const |
Returns true iff the machine this controller belongs to is currently active. | |
void | transferSettings (const MSXCommandController &from) |
Transfer setting values from one machine to another, used for during 'reverse'. | |
bool | hasCommand (std::string_view command) const |
void | registerCompleter (CommandCompleter &completer, std::string_view str) override |
(Un)register a command completer, used to complete build-in Tcl cmds | |
void | unregisterCompleter (CommandCompleter &completer, std::string_view str) override |
void | registerCommand (Command &command, zstring_view str) override |
(Un)register a command | |
void | unregisterCommand (Command &command, std::string_view str) override |
TclObject | executeCommand (zstring_view command, CliConnection *connection=nullptr) override |
Execute the given command. | |
void | registerSetting (Setting &setting) override |
TODO. | |
void | unregisterSetting (Setting &setting) override |
MSXCliComm & | getCliComm () override |
Interpreter & | getInterpreter () override |
Additional Inherited Members | |
Protected Member Functions inherited from openmsx::CommandController | |
CommandController ()=default | |
~CommandController ()=default | |
Definition at line 22 of file MSXCommandController.hh.
openmsx::MSXCommandController::MSXCommandController | ( | GlobalCommandController & | globalCommandController, |
Reactor & | reactor, | ||
MSXMotherBoard & | motherboard, | ||
MSXEventDistributor & | msxEventDistributor, | ||
const std::string & | machineID | ||
) |
Definition at line 18 of file MSXCommandController.cc.
References openmsx::Interpreter::createNamespace(), openmsx::GlobalCommandController::getInterpreter(), and openmsx::MSXEventDistributor::registerEventListener().
|
delete |
|
delete |
openmsx::MSXCommandController::~MSXCommandController | ( | ) |
Definition at line 38 of file MSXCommandController.cc.
References openmsx::Interpreter::deleteNamespace(), openmsx::GlobalCommandController::getInterpreter(), and openmsx::MSXEventDistributor::unregisterEventListener().
|
overridevirtual |
Execute the given command.
Implements openmsx::CommandController.
Definition at line 138 of file MSXCommandController.cc.
References openmsx::GlobalCommandController::executeCommand().
Command * openmsx::MSXCommandController::findCommand | ( | std::string_view | name | ) | const |
Definition at line 127 of file MSXCommandController.cc.
References end().
Referenced by hasCommand().
Setting * openmsx::MSXCommandController::findSetting | ( | std::string_view | name | ) | const |
Definition at line 121 of file MSXCommandController.cc.
References ranges::find(), and openmsx::BaseSetting::getBaseName().
|
overridevirtual |
Implements openmsx::CommandController.
Definition at line 144 of file MSXCommandController.cc.
References openmsx::MSXMotherBoard::getMSXCliComm().
Referenced by openmsx::MSXMixer::registerSound(), and openmsx::MSXMixer::unregisterSound().
|
inline |
Definition at line 36 of file MSXCommandController.hh.
|
overridevirtual |
Implements openmsx::CommandController.
Definition at line 149 of file MSXCommandController.cc.
References openmsx::GlobalCommandController::getInterpreter().
Referenced by transferSettings().
|
inline |
Definition at line 39 of file MSXCommandController.hh.
|
inline |
Definition at line 42 of file MSXCommandController.hh.
|
inline |
Definition at line 45 of file MSXCommandController.hh.
Referenced by transferSettings().
bool openmsx::MSXCommandController::hasCommand | ( | std::string_view | command | ) | const |
Definition at line 133 of file MSXCommandController.cc.
References findCommand().
Referenced by openmsx::RealDrive::RealDrive(), registerCommand(), and unregisterCommand().
bool openmsx::MSXCommandController::isActive | ( | ) | const |
Returns true iff the machine this controller belongs to is currently active.
Definition at line 170 of file MSXCommandController.cc.
References openmsx::Reactor::getMotherBoard().
|
delete |
|
delete |
|
overridevirtual |
(Un)register a command
Implements openmsx::CommandController.
Definition at line 63 of file MSXCommandController.cc.
References openmsx::Completer::getName(), hasCommand(), openmsx::GlobalCommandController::registerCommand(), openmsx::GlobalCommandController::registerProxyCommand(), and openmsx::Command::setAllowedInEmptyMachine().
|
overridevirtual |
(Un)register a command completer, used to complete build-in Tcl cmds
Implements openmsx::CommandController.
Definition at line 87 of file MSXCommandController.cc.
References openmsx::GlobalCommandController::registerCompleter().
|
overridevirtual |
TODO.
Implements openmsx::CommandController.
Definition at line 101 of file MSXCommandController.cc.
References openmsx::GlobalCommandController::getInterpreter(), openmsx::GlobalCommandController::getSettingsManager(), openmsx::GlobalCommandController::registerProxySetting(), openmsx::SettingsManager::registerSetting(), openmsx::Interpreter::registerSetting(), and setting.
void openmsx::MSXCommandController::transferSettings | ( | const MSXCommandController & | from | ) |
Transfer setting values from one machine to another, used for during 'reverse'.
Definition at line 175 of file MSXCommandController.cc.
References getInterpreter(), getPrefix(), openmsx::GlobalCommandController::getSettingsManager(), and openmsx::Interpreter::setVariable().
|
overridevirtual |
Implements openmsx::CommandController.
Definition at line 76 of file MSXCommandController.cc.
References openmsx::Completer::getName(), hasCommand(), openmsx::GlobalCommandController::unregisterCommand(), and openmsx::GlobalCommandController::unregisterProxyCommand().
|
overridevirtual |
Implements openmsx::CommandController.
Definition at line 94 of file MSXCommandController.cc.
References openmsx::GlobalCommandController::unregisterCompleter().
|
overridevirtual |
Implements openmsx::CommandController.
Definition at line 112 of file MSXCommandController.cc.
References openmsx::GlobalCommandController::getInterpreter(), openmsx::GlobalCommandController::getSettingsManager(), move_pop_back(), rfind_unguarded(), setting, openmsx::GlobalCommandController::unregisterProxySetting(), openmsx::SettingsManager::unregisterSetting(), and openmsx::Interpreter::unregisterSetting().