Implementation of the "help" command of the Simulator Control Language.
Definition at line 45 of file HelpCommand.hh.
bool HelpCommand::execute |
( |
const std::vector< DataObject > & |
arguments | ) |
|
|
virtual |
Executes the help command.
Prints a help message briefly describing command command. If no command is given, prints general help and a listing of available commands.
- Parameters
-
arguments | Arguments for the command. |
- Returns
- True if execution is succesfull, false otherwise
- Exceptions
-
Implements CustomCommand.
Definition at line 67 of file HelpCommand.cc.
67 {
69 return false;
70 }
71
72 if (arguments.size() == 1) {
75 << std::endl << std::endl;
76
79
81 for (size_t i = 0; i < names.size(); i++) {
83 }
85 return true;
86 }
87
89 string cmdName = arguments[1].stringValue();
91 if (command == NULL) {
96 return false;
97 } else {
99 return true;
100 }
101
102 return true;
103}
bool checkArgumentCount(int argumentCount, int minimum, int maximum)
virtual std::string helpText() const =0
ScriptInterpreter * interpreter() const
virtual void setString(std::string value)
virtual CustomCommand * customCommand(const std::string &commandName)
std::vector< std::string > customCommandsSortedByName()
virtual void setResult(DataObject *result)
virtual std::ostream & outputStream()
virtual boost::format text(int textId)
@ TXT_CLI_ONLINE_HELP
Online help text.
@ TXT_INTERP_HELP_COMMANDS_AVAILABLE
Description of the execution trace setting.
References CustomCommand::checkArgumentCount(), ScriptInterpreter::customCommand(), ScriptInterpreter::customCommandsSortedByName(), CustomCommand::helpText(), CustomCommand::interpreter(), SimControlLanguageCommand::outputStream(), ScriptInterpreter::setResult(), DataObject::setString(), Texts::TextGenerator::text(), SimulatorToolbox::textGenerator(), Texts::TXT_CLI_ONLINE_HELP, Texts::TXT_INTERP_HELP_COMMANDS_AVAILABLE, and Texts::TXT_UNKNOWN_COMMAND.