openMSX
Public Member Functions | List of all members
openmsx::DiskCommand Class Referencefinal
Inheritance diagram for openmsx::DiskCommand:
Inheritance graph
[legend]
Collaboration diagram for openmsx::DiskCommand:
Collaboration graph
[legend]

Public Member Functions

 DiskCommand (CommandController &commandController, DiskChanger &diskChanger)
 
void execute (array_ref< TclObject > tokens, TclObject &result) override
 Execute this command. More...
 
string help (const vector< string > &tokens) const override
 Print help for this command. More...
 
void tabCompletion (vector< string > &tokens) const override
 Attempt tab completion for this command. More...
 
bool needRecord (array_ref< TclObject > tokens) const
 
- Public Member Functions inherited from openmsx::Command
void setAllowedInEmptyMachine (bool value)
 
bool isAllowedInEmptyMachine () const
 
void setToken (void *token_)
 
void * getToken () const
 
- Public Member Functions inherited from openmsx::CommandCompleter
 CommandCompleter (const CommandCompleter &)=delete
 
CommandCompleteroperator= (const CommandCompleter &)=delete
 
CommandControllergetCommandController () const
 
InterpretergetInterpreter () const
 
- Public Member Functions inherited from openmsx::Completer
const std::string & getName () const
 
template<typename ITER >
NEVER_INLINE std::vector< string_reffilter (string_ref str, ITER begin, ITER end, bool caseSensitive)
 

Additional Inherited Members

- Static Public Member Functions inherited from openmsx::Completer
template<typename ITER >
static void completeString (std::vector< std::string > &tokens, ITER begin, ITER end, bool caseSensitive=true)
 
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 std::vector< std::string > formatListInColumns (const std::vector< string_ref > &input)
 
static void setOutput (InterpreterOutput *output_)
 
- Protected Member Functions inherited from openmsx::Command
 Command (CommandController &controller, string_ref name)
 
 ~Command ()
 
- Protected Member Functions inherited from openmsx::CommandCompleter
 CommandCompleter (CommandController &controller, string_ref name)
 
 ~CommandCompleter ()
 
GlobalCommandControllergetGlobalCommandController () const
 
CliCommgetCliComm () const
 
- Protected Member Functions inherited from openmsx::Completer
 Completer (string_ref name)
 
 ~Completer ()
 

Detailed Description

Definition at line 33 of file DiskChanger.cc.

Constructor & Destructor Documentation

◆ DiskCommand()

openmsx::DiskCommand::DiskCommand ( CommandController commandController,
DiskChanger diskChanger 
)

Definition at line 200 of file DiskChanger.cc.

Member Function Documentation

◆ execute()

void openmsx::DiskCommand::execute ( array_ref< TclObject tokens,
TclObject result 
)
overridevirtual

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.

Implements openmsx::Command.

Definition at line 207 of file DiskChanger.cc.

References openmsx::TclObject::addListElement(), openmsx::DiskChanger::getDiskName(), openmsx::DiskChanger::getDriveName(), openmsx::CommandCompleter::getInterpreter(), openmsx::TclObject::getListLength(), openmsx::MSXException::getMessage(), openmsx::DiskName::getResolved(), openmsx::TclObject::setString(), array_ref< T >::size(), and string_ref::str().

◆ help()

string openmsx::DiskCommand::help ( const vector< string > &  tokens) const
overridevirtual

Print help for this command.

Implements openmsx::Completer.

Definition at line 277 of file DiskChanger.cc.

References openmsx::DiskChanger::getDriveName().

◆ needRecord()

bool openmsx::DiskCommand::needRecord ( array_ref< TclObject tokens) const

◆ tabCompletion()

void openmsx::DiskCommand::tabCompletion ( vector< string > &  tokens) const
overridevirtual

Attempt tab completion for this command.

Default implementation does nothing.

Parameters
tokensTokenized command line; tokens[0] is the command itself. The last token is incomplete, this method tries to complete it.

Reimplemented from openmsx::Command.

Definition at line 289 of file DiskChanger.cc.

References openmsx::Completer::completeFileName(), and openmsx::userFileContext().


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