12 :
Command(reactor_.getGlobalCommandController(), name_)
17Command* ProxyCmd::getMachineCommand()
const
20 if (!motherBoard)
return nullptr;
26 if (
Command* command = getMachineCommand()) {
27 if (!command->isAllowedInEmptyMachine()) {
28 const auto* controller = checked_cast<const MSXCommandController*>(
29 &command->getCommandController());
30 if (!controller->getMSXMotherBoard().getMachineConfig()) {
32 "Can't execute command in empty machine");
35 command->execute(tokens, result);
43 if (
const auto* command = getMachineCommand()) {
44 return command->help(tokens);
46 return "unknown command: " +
getName();
52 if (
const auto* command = getMachineCommand()) {
53 command->tabCompletion(tokens);
const std::string & getName() const
Command * findCommand(std::string_view name) const
MSXCommandController & getMSXCommandController()
void tabCompletion(std::vector< std::string > &tokens) const override
Attempt tab completion for this command.
std::string help(std::span< const TclObject > tokens) const override
Print help for this command.
ProxyCmd(Reactor &reactor, std::string_view name)
void execute(std::span< const TclObject > tokens, TclObject &result) override
Execute this command.
Contains the main loop of openMSX.
MSXMotherBoard * getMotherBoard() const
This file implemented 3 utility functions: