|
openMSX
|
#include <Command.hh>


Public Member Functions | |
| virtual void | execute (const std::vector< TclObject > &tokens, TclObject &result) |
| Execute this command. | |
| virtual std::string | execute (const std::vector< std::string > &tokens) |
| Alternative for the execute() method above. | |
| virtual void | tabCompletion (std::vector< std::string > &tokens) const |
| Attempt tab completion for this command. | |
| void | setAllowedInEmptyMachine (bool value) |
| bool | isAllowedInEmptyMachine () const |
Public Member Functions inherited from openmsx::CommandCompleter | |
| CommandController & | getCommandController () const |
Public Member Functions inherited from openmsx::Completer | |
| const std::string & | getName () const |
| virtual std::string | help (const std::vector< std::string > &tokens) const =0 |
| Print help for this command. | |
Protected Member Functions | |
| Command (CommandController &commandController, string_ref name) | |
| virtual | ~Command () |
Protected Member Functions inherited from openmsx::CommandCompleter | |
| CommandCompleter (CommandController &commandController, string_ref name) | |
| virtual | ~CommandCompleter () |
| GlobalCommandController & | getGlobalCommandController () const |
| Interpreter & | getInterpreter () const |
| CliComm & | getCliComm () const |
Protected Member Functions inherited from openmsx::Completer | |
| Completer (string_ref name) | |
| virtual | ~Completer () |
Additional Inherited Members | |
Static Public Member Functions inherited from openmsx::Completer | |
| template<typename RANGE > | |
| static void | completeString (std::vector< std::string > &tokens, const RANGE &possibleValues, bool caseSensitive=true) |
| template<typename RANGE > | |
| static void | completeFileName (std::vector< std::string > &tokens, const FileContext &context, const RANGE &extra) |
| static void | completeFileName (std::vector< std::string > &tokens, const FileContext &context) |
| static void | setOutput (InterpreterOutput *output) |
Definition at line 35 of file Command.hh.
|
protected |
Definition at line 64 of file Command.cc.
References openmsx::CommandCompleter::getCommandController(), openmsx::Completer::getName(), and openmsx::CommandController::registerCommand().
|
protectedvirtual |
Definition at line 73 of file Command.cc.
References openmsx::CommandCompleter::getCommandController(), openmsx::Completer::getName(), and openmsx::CommandController::unregisterCommand().
|
virtual |
Execute this command.
| tokens | Tokenized command line; tokens[0] is the command itself. |
| result | The result of the command must be assigned to this parameter. |
| CommandException | Thrown when there was an error while executing this command. |
Reimplemented in openmsx::ListExtCmd, openmsx::ListMachinesCommand, openmsx::ReverseCmd, openmsx::TabCompletionCmd, openmsx::DiskCommand, openmsx::HelpCmd, openmsx::RecordCommand, openmsx::OSDCommand, openmsx::UserSettingCommand, and openmsx::ProxyCmd.
Definition at line 80 of file Command.cc.
References openmsx::TclObject::setString().
|
virtual |
Alternative for the execute() method above.
It has a simpler interface, but performance is a bit lower. Subclasses should override either this method or the one above.
Reimplemented in openmsx::LoadMachineCmd, openmsx::RestoreMachineCommand, openmsx::StoreMachineCommand, openmsx::ActivateMachineCommand, openmsx::DeleteMachineCommand, openmsx::CreateMachineCommand, openmsx::TestMachineCommand, openmsx::DeactivateCmd, openmsx::ActivateCmd, openmsx::MachineCommand, openmsx::UpdateCmd, openmsx::QuitCommand, openmsx::UnbindCmd, openmsx::ScreenShotCmd, openmsx::BindCmd, openmsx::LoadSettingsCommand, openmsx::SaveSettingsCommand, openmsx::EscapeGrabCmd, openmsx::NowindCommand, and openmsx::MessageCommand.
Definition at line 90 of file Command.cc.
References UNREACHABLE.
|
inline |
Definition at line 65 of file Command.hh.
|
inline |
Definition at line 64 of file Command.hh.
Referenced by openmsx::LoadMachineCmd::LoadMachineCmd(), and openmsx::MSXCommandController::registerCommand().
|
virtual |
Attempt tab completion for this command.
Default implementation does nothing.
| tokens | Tokenized command line; tokens[0] is the command itself. The last token is incomplete, this method tries to complete it. |
Implements openmsx::Completer.
Reimplemented in openmsx::LoadMachineCmd, openmsx::RestoreMachineCommand, openmsx::StoreMachineCommand, openmsx::ActivateMachineCommand, openmsx::ReverseCmd, openmsx::DeleteMachineCommand, openmsx::TestMachineCommand, openmsx::MachineCommand, openmsx::UpdateCmd, openmsx::ScreenShotCmd, openmsx::DiskCommand, openmsx::LoadSettingsCommand, openmsx::HelpCmd, openmsx::RecordCommand, openmsx::SaveSettingsCommand, openmsx::OSDCommand, openmsx::UserSettingCommand, openmsx::NowindCommand, openmsx::ProxyCmd, and openmsx::MessageCommand.
Definition at line 97 of file Command.cc.
1.8.1.2