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 (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 )
delete

◆ 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 
)
overridevirtual

Execute the given command.

Implements openmsx::CommandController.

Definition at line 134 of file MSXCommandController.cc.

References openmsx::GlobalCommandController::executeCommand().

Referenced by getPrefix().

◆ findCommand()

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

Definition at line 123 of file MSXCommandController.cc.

References end().

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

◆ getCliComm()

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

◆ getGlobalCommandController()

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

Definition at line 33 of file MSXCommandController.hh.

◆ getInterpreter()

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

◆ getMachineInfoCommand()

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

Definition at line 36 of file MSXCommandController.hh.

◆ getMSXMotherBoard()

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

Definition at line 39 of file MSXCommandController.hh.

◆ getPrefix()

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

◆ hasCommand()

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

Does a command with this name already exist?

Implements openmsx::CommandController.

Definition at line 129 of file MSXCommandController.cc.

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

References openmsx::Reactor::getMotherBoard().

Referenced by getPrefix().

◆ operator=()

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

◆ registerCommand()

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

◆ registerCompleter()

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

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

Implements openmsx::CommandController.

Definition at line 89 of file MSXCommandController.cc.

References openmsx::GlobalCommandController::registerCompleter().

Referenced by getPrefix().

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

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 
)
overridevirtual

◆ unregisterCompleter()

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

◆ unregisterSetting()

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

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