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 (const MSXCommandController &)=delete
MSXCommandControlleroperator= (const MSXCommandController &)=delete
 MSXCommandController (GlobalCommandController &globalCommandController, Reactor &reactor, MSXMotherBoard &motherboard, MSXEventDistributor &msxEventDistributor, const std::string &machineID)
 ~MSXCommandController ()
GlobalCommandControllergetGlobalCommandController ()
InfoCommandgetMachineInfoCommand ()
MSXMotherBoardgetMSXMotherBoard () const
const std::string & getPrefix () const
CommandfindCommand (string_view name) const
bool isActive () const
 Returns true iff the machine this controller belongs to is currently active. More...
void transferSettings (const MSXCommandController &from)
 Transfer setting values from one machine to another, used for during 'reverse'. More...
void registerCompleter (CommandCompleter &completer, string_view str) override
 (Un)register a command completer, used to complete build-in Tcl cmds More...
void unregisterCompleter (CommandCompleter &completer, string_view str) override
void registerCommand (Command &command, const std::string &str) override
 (Un)register a command More...
void unregisterCommand (Command &command, string_view str) override
bool hasCommand (string_view command) const override
 Does a command with this name already exist? More...
TclObject executeCommand (const std::string &command, CliConnection *connection=nullptr) override
 Execute the given command. More...
void registerSetting (Setting &setting) override
 TODO. More...
void unregisterSetting (Setting &setting) override
CliCommgetCliComm () override
InterpretergetInterpreter () override

Additional Inherited Members

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

Detailed Description

Definition at line 20 of file MSXCommandController.hh.

Constructor & Destructor Documentation

◆ MSXCommandController() [1/2]

openmsx::MSXCommandController::MSXCommandController ( const MSXCommandController )

◆ MSXCommandController() [2/2]

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

◆ ~MSXCommandController()

openmsx::MSXCommandController::~MSXCommandController ( )

Member Function Documentation

◆ executeCommand()

TclObject openmsx::MSXCommandController::executeCommand ( const std::string &  command,
CliConnection connection = nullptr 

Execute the given command.

Implements openmsx::CommandController.

Definition at line 134 of file

References openmsx::GlobalCommandController::executeCommand().

Referenced by getPrefix().

◆ findCommand()

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

Definition at line 123 of file

References end().

Referenced by getPrefix(), hasCommand(), and openmsx::ProxyCmd::ProxyCmd().

◆ getCliComm()

CliComm & openmsx::MSXCommandController::getCliComm ( )

◆ getGlobalCommandController()

GlobalCommandController& openmsx::MSXCommandController::getGlobalCommandController ( )

Definition at line 33 of file MSXCommandController.hh.

◆ getInterpreter()

Interpreter & openmsx::MSXCommandController::getInterpreter ( )

◆ getMachineInfoCommand()

InfoCommand& openmsx::MSXCommandController::getMachineInfoCommand ( )

Definition at line 36 of file MSXCommandController.hh.

◆ getMSXMotherBoard()

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

Definition at line 39 of file MSXCommandController.hh.

◆ getPrefix()

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

◆ hasCommand()

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

Does a command with this name already exist?

Implements openmsx::CommandController.

Definition at line 129 of file

References findCommand().

Referenced by getPrefix(), registerCommand(), and unregisterCommand().

◆ isActive()

bool openmsx::MSXCommandController::isActive ( ) const

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

Definition at line 166 of file

References openmsx::Reactor::getMotherBoard().

Referenced by getPrefix().

◆ operator=()

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

◆ registerCommand()

void openmsx::MSXCommandController::registerCommand ( Command command,
const std::string &  str 

◆ registerCompleter()

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

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

Implements openmsx::CommandController.

Definition at line 89 of file

References openmsx::GlobalCommandController::registerCompleter().

Referenced by getPrefix().

◆ 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 171 of file

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

Referenced by getPrefix(), and openmsx::ReverseManager::~ReverseManager().

◆ unregisterCommand()

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

◆ unregisterCompleter()

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

◆ unregisterSetting()

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

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