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

#include <MSXCommandController.hh>

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

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
 TODO.
 
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 )
delete

◆ MSXCommandController() [3/3]

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

◆ ~MSXCommandController()

openmsx::MSXCommandController::~MSXCommandController ( )

Member Function Documentation

◆ executeCommand()

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

Execute the given command.

Implements openmsx::CommandController.

Definition at line 138 of file MSXCommandController.cc.

References openmsx::GlobalCommandController::executeCommand().

◆ findCommand()

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

Definition at line 127 of file MSXCommandController.cc.

References end().

Referenced by hasCommand().

◆ findSetting()

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

Definition at line 121 of file MSXCommandController.cc.

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

◆ getCliComm()

MSXCliComm & openmsx::MSXCommandController::getCliComm ( )
overridevirtual

◆ getGlobalCommandController()

GlobalCommandController & openmsx::MSXCommandController::getGlobalCommandController ( )
inline

Definition at line 36 of file MSXCommandController.hh.

◆ getInterpreter()

Interpreter & openmsx::MSXCommandController::getInterpreter ( )
overridevirtual

◆ getMachineInfoCommand()

InfoCommand & openmsx::MSXCommandController::getMachineInfoCommand ( )
inline

Definition at line 39 of file MSXCommandController.hh.

◆ getMSXMotherBoard()

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

Definition at line 42 of file MSXCommandController.hh.

◆ getPrefix()

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

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 MSXCommandController.cc.

References openmsx::Reactor::getMotherBoard().

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ registerCommand()

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

◆ registerCompleter()

void openmsx::MSXCommandController::registerCompleter ( CommandCompleter completer,
std::string_view  str 
)
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().

◆ registerSetting()

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

◆ 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 MSXCommandController.cc.

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

◆ unregisterCommand()

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

◆ unregisterCompleter()

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

◆ unregisterSetting()

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

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