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 (std::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...
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 More...
void unregisterCompleter (CommandCompleter &completer, std::string_view str) override
void registerCommand (Command &command, zstring_view str) override
 (Un)register a command More...
void unregisterCommand (Command &command, std::string_view str) override
TclObject executeCommand (zstring_view 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
virtual void registerCompleter (CommandCompleter &completer, std::string_view str)=0
 (Un)register a command completer, used to complete build-in Tcl cmds More...
virtual void unregisterCompleter (CommandCompleter &completer, std::string_view str)=0
virtual void registerCommand (Command &command, zstring_view str)=0
 (Un)register a command More...
virtual void unregisterCommand (Command &command, std::string_view str)=0
virtual TclObject executeCommand (zstring_view command, CliConnection *connection=nullptr)=0
 Execute the given command. More...
virtual void registerSetting (Setting &setting)=0
 TODO. More...
virtual void unregisterSetting (Setting &setting)=0
virtual CliCommgetCliComm ()=0
virtual InterpretergetInterpreter ()=0

Additional Inherited Members

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

Detailed Description

Definition at line 21 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 ( zstring_view  command,
CliConnection connection = nullptr 

Execute the given command.

Implements openmsx::CommandController.

Definition at line 132 of file

References openmsx::GlobalCommandController::executeCommand().

◆ findCommand()

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

Definition at line 121 of file

References end().

Referenced by hasCommand().

◆ getCliComm()

CliComm & openmsx::MSXCommandController::getCliComm ( )

◆ getGlobalCommandController()

GlobalCommandController & openmsx::MSXCommandController::getGlobalCommandController ( )

Definition at line 34 of file MSXCommandController.hh.

◆ getInterpreter()

Interpreter & openmsx::MSXCommandController::getInterpreter ( )

◆ getMachineInfoCommand()

InfoCommand & openmsx::MSXCommandController::getMachineInfoCommand ( )

Definition at line 37 of file MSXCommandController.hh.

◆ getMSXMotherBoard()

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

Definition at line 40 of file MSXCommandController.hh.

◆ getPrefix()

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

Definition at line 43 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 164 of file

References openmsx::Reactor::getMotherBoard().

◆ operator=()

MSXCommandController & openmsx::MSXCommandController::operator= ( const 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 169 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: