openMSX
Public Member Functions | Protected Member Functions | List of all members
openmsx::Command Class Reference

#include <Command.hh>

Inheritance diagram for openmsx::Command:
Inheritance graph
[legend]
Collaboration diagram for openmsx::Command:
Collaboration graph
[legend]

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
CommandControllergetCommandController () 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 ()
GlobalCommandControllergetGlobalCommandController () const
InterpretergetInterpreter () const
CliCommgetCliComm () 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)

Detailed Description

Definition at line 35 of file Command.hh.

Constructor & Destructor Documentation

openmsx::Command::Command ( CommandController commandController,
string_ref  name 
)
protected
openmsx::Command::~Command ( )
protectedvirtual

Member Function Documentation

void openmsx::Command::execute ( const std::vector< TclObject > &  tokens,
TclObject result 
)
virtual

Execute this command.

Parameters
tokensTokenized command line; tokens[0] is the command itself.
resultThe result of the command must be assigned to this parameter.
Exceptions
CommandExceptionThrown 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().

string openmsx::Command::execute ( const std::vector< std::string > &  tokens)
virtual
bool openmsx::Command::isAllowedInEmptyMachine ( ) const
inline

Definition at line 65 of file Command.hh.

void openmsx::Command::setAllowedInEmptyMachine ( bool  value)
inline
void openmsx::Command::tabCompletion ( std::vector< std::string > &  tokens) const
virtual

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