Classes | Public Member Functions | List of all members
openmsx::MSXCommandController Class Referencefinal

#include <MSXCommandController.hh>

Inheritance diagram for openmsx::MSXCommandController:
Inheritance graph
Collaboration diagram for openmsx::MSXCommandController:
Collaboration graph

Public Member Functions

 MSXCommandController (GlobalCommandController &globalCommandController, Reactor &reactor, MSXMotherBoard &motherboard, MSXEventDistributor &msxEventDistributor, const std::string &machineID)
 MSXCommandController (const MSXCommandController &)=delete
 MSXCommandController (MSXCommandController &&)=delete
MSXCommandControlleroperator= (const MSXCommandController &)=delete
MSXCommandControlleroperator= (MSXCommandController &&)=delete
 ~MSXCommandController ()
GlobalCommandControllergetGlobalCommandController ()
InfoCommandgetMachineInfoCommand ()
MSXMotherBoardgetMSXMotherBoard () const
const std::string & getPrefix () const
CommandfindCommand (std::string_view name) const
SettingfindSetting (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
void unregisterSetting (Setting &setting) override
MSXCliCommgetCliComm () override
InterpretergetInterpreter () override

Additional Inherited Members

- Protected Member Functions inherited from openmsx::CommandController
 CommandController ()=default
 ~CommandController ()=default

Detailed Description

Definition at line 22 of file MSXCommandController.hh.

Constructor & Destructor Documentation

◆ MSXCommandController() [1/3]

openmsx::MSXCommandController::MSXCommandController ( GlobalCommandController globalCommandController,
Reactor reactor,
MSXMotherBoard motherboard,
MSXEventDistributor msxEventDistributor,
const std::string &  machineID 

◆ MSXCommandController() [2/3]

openmsx::MSXCommandController::MSXCommandController ( const MSXCommandController )

◆ MSXCommandController() [3/3]

openmsx::MSXCommandController::MSXCommandController ( MSXCommandController &&  )

◆ ~MSXCommandController()

openmsx::MSXCommandController::~MSXCommandController ( )

Member Function Documentation

◆ executeCommand()

TclObject openmsx::MSXCommandController::executeCommand ( zstring_view  command,
CliConnection connection = nullptr 

Execute the given command.

Implements openmsx::CommandController.

Definition at line 138 of file

References openmsx::GlobalCommandController::executeCommand().

◆ findCommand()

Command * openmsx::MSXCommandController::findCommand ( std::string_view  name) const

Definition at line 127 of file

References end().

Referenced by hasCommand().

◆ findSetting()

Setting * openmsx::MSXCommandController::findSetting ( std::string_view  name) const

Definition at line 121 of file

References ranges::find(), and openmsx::BaseSetting::getBaseName().

◆ getCliComm()

MSXCliComm & openmsx::MSXCommandController::getCliComm ( )

◆ getGlobalCommandController()

GlobalCommandController & openmsx::MSXCommandController::getGlobalCommandController ( )

Definition at line 36 of file MSXCommandController.hh.

◆ getInterpreter()

Interpreter & openmsx::MSXCommandController::getInterpreter ( )

◆ getMachineInfoCommand()

InfoCommand & openmsx::MSXCommandController::getMachineInfoCommand ( )

Definition at line 39 of file MSXCommandController.hh.

◆ getMSXMotherBoard()

MSXMotherBoard & openmsx::MSXCommandController::getMSXMotherBoard ( ) const

Definition at line 42 of file MSXCommandController.hh.

◆ getPrefix()

const std::string & openmsx::MSXCommandController::getPrefix ( ) const

Definition at line 45 of file MSXCommandController.hh.

Referenced by transferSettings().

◆ hasCommand()

bool openmsx::MSXCommandController::hasCommand ( std::string_view  command) const

◆ isActive()

bool openmsx::MSXCommandController::isActive ( ) const

Returns true iff the machine this controller belongs to is currently active.

Definition at line 170 of file

References openmsx::Reactor::getMotherBoard().

◆ operator=() [1/2]

MSXCommandController & openmsx::MSXCommandController::operator= ( const MSXCommandController )

◆ operator=() [2/2]

MSXCommandController & openmsx::MSXCommandController::operator= ( MSXCommandController &&  )

◆ registerCommand()

void openmsx::MSXCommandController::registerCommand ( Command command,
zstring_view  str 

◆ registerCompleter()

void openmsx::MSXCommandController::registerCompleter ( CommandCompleter completer,
std::string_view  str 

(Un)register a command completer, used to complete build-in Tcl cmds

Implements openmsx::CommandController.

Definition at line 87 of file

References openmsx::GlobalCommandController::registerCompleter().

◆ registerSetting()

void openmsx::MSXCommandController::registerSetting ( Setting setting)

◆ transferSettings()

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

References getInterpreter(), getPrefix(), openmsx::GlobalCommandController::getSettingsManager(), and openmsx::Interpreter::setVariable().

◆ unregisterCommand()

void openmsx::MSXCommandController::unregisterCommand ( Command command,
std::string_view  str 

◆ unregisterCompleter()

void openmsx::MSXCommandController::unregisterCompleter ( CommandCompleter completer,
std::string_view  str 

◆ unregisterSetting()

void openmsx::MSXCommandController::unregisterSetting ( Setting setting)

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