openMSX
Public Member Functions | Friends | List of all members
openmsx::GlobalCommandController Class Reference

#include <GlobalCommandController.hh>

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

Public Member Functions

 GlobalCommandController (EventDistributor &eventDistributor, GlobalCliComm &cliComm, Reactor &reactor)
 ~GlobalCommandController ()
InfoCommandgetOpenMSXInfoCommand ()
void source (const std::string &script)
 Executes all defined auto commands.
void registerProxyCommand (const std::string &name)
void unregisterProxyCommand (string_ref name)
void registerProxySetting (Setting &setting)
void unregisterProxySetting (Setting &setting)
void changeSetting (const std::string &name, const std::string &value)
virtual void registerCompleter (CommandCompleter &completer, string_ref str)
virtual void unregisterCompleter (CommandCompleter &completer, string_ref str)
virtual void registerCommand (Command &command, const std::string &str)
virtual void unregisterCommand (Command &command, string_ref str)
virtual bool hasCommand (string_ref command) const
virtual std::string executeCommand (const std::string &command, CliConnection *connection=nullptr)
virtual std::string tabCompletion (string_ref command)
 Complete the given command.
virtual bool isComplete (const std::string &command)
 Returns true iff the command is complete (all braces, quotes etc.
virtual std::vector< std::string > splitList (const std::string &list)
virtual void registerSetting (Setting &setting)
virtual void unregisterSetting (Setting &setting)
virtual SettingfindSetting (string_ref name)
virtual void changeSetting (Setting &setting, const std::string &value)
virtual CliCommgetCliComm ()
virtual InterpretergetInterpreter ()
virtual SettingsConfiggetSettingsConfig ()
virtual CliConnectiongetConnection () const
- Public Member Functions inherited from openmsx::CommandController
virtual void registerCompleter (CommandCompleter &completer, string_ref str)=0
 (Un)register a command completer, used to complete build-in Tcl cmds
virtual void unregisterCompleter (CommandCompleter &completer, string_ref str)=0
virtual void registerCommand (Command &command, const std::string &str)=0
 (Un)register a command
virtual void unregisterCommand (Command &command, string_ref str)=0
virtual bool hasCommand (string_ref command) const =0
 Does a command with this name already exist?
virtual std::string executeCommand (const std::string &command, CliConnection *connection=nullptr)=0
 Execute the given command.
virtual std::vector< std::string > splitList (const std::string &list)=0
virtual void registerSetting (Setting &setting)=0
 TODO.
virtual void unregisterSetting (Setting &setting)=0
virtual SettingfindSetting (string_ref name)=0
virtual void changeSetting (Setting &setting, const std::string &value)=0
virtual CliCommgetCliComm ()=0

Friends

class HelpCmd

Additional Inherited Members

- Protected Member Functions inherited from openmsx::CommandController
 CommandController ()
virtual ~CommandController ()

Detailed Description

Definition at line 28 of file GlobalCommandController.hh.

Constructor & Destructor Documentation

openmsx::GlobalCommandController::GlobalCommandController ( EventDistributor eventDistributor,
GlobalCliComm cliComm,
Reactor reactor 
)

Definition at line 77 of file GlobalCommandController.cc.

openmsx::GlobalCommandController::~GlobalCommandController ( )

Definition at line 120 of file GlobalCommandController.cc.

References StringMapImpl::empty().

Member Function Documentation

void openmsx::GlobalCommandController::changeSetting ( const std::string &  name,
const std::string &  value 
)
void openmsx::GlobalCommandController::changeSetting ( Setting setting,
const std::string &  value 
)
virtual

Definition at line 283 of file GlobalCommandController.cc.

References changeSetting(), and openmsx::Setting::getName().

string openmsx::GlobalCommandController::executeCommand ( const std::string &  command,
CliConnection connection = nullptr 
)
virtual
Setting * openmsx::GlobalCommandController::findSetting ( string_ref  name)
virtual
CliComm & openmsx::GlobalCommandController::getCliComm ( )
virtual

Definition at line 195 of file GlobalCommandController.cc.

Referenced by openmsx::HotKey::loadBindings(), and source().

CliConnection * openmsx::GlobalCommandController::getConnection ( ) const
virtual

Definition at line 200 of file GlobalCommandController.cc.

Interpreter & openmsx::GlobalCommandController::getInterpreter ( )
virtual
InfoCommand & openmsx::GlobalCommandController::getOpenMSXInfoCommand ( )

Definition at line 210 of file GlobalCommandController.cc.

SettingsConfig & openmsx::GlobalCommandController::getSettingsConfig ( )
virtual
bool openmsx::GlobalCommandController::hasCommand ( string_ref  command) const
virtual
bool openmsx::GlobalCommandController::isComplete ( const std::string &  command)
virtual

Returns true iff the command is complete (all braces, quotes etc.

are balanced).

Definition at line 425 of file GlobalCommandController.cc.

void openmsx::GlobalCommandController::registerCommand ( Command command,
const std::string &  str 
)
virtual
void openmsx::GlobalCommandController::registerCompleter ( CommandCompleter completer,
string_ref  str 
)
virtual
void openmsx::GlobalCommandController::registerProxyCommand ( const std::string &  name)
void openmsx::GlobalCommandController::registerProxySetting ( Setting setting)
void openmsx::GlobalCommandController::registerSetting ( Setting setting)
virtual
void openmsx::GlobalCommandController::source ( const std::string &  script)
vector< string > openmsx::GlobalCommandController::splitList ( const std::string &  list)
virtual
string openmsx::GlobalCommandController::tabCompletion ( string_ref  command)
virtual

Complete the given command.

Definition at line 453 of file GlobalCommandController.cc.

References TclParser::getLast(), and string_ref::substr().

Referenced by openmsx::TabCompletionCmd::execute(), and openmsx::HelpCmd::tabCompletion().

void openmsx::GlobalCommandController::unregisterCommand ( Command command,
string_ref  str 
)
virtual
void openmsx::GlobalCommandController::unregisterCompleter ( CommandCompleter completer,
string_ref  str 
)
virtual
void openmsx::GlobalCommandController::unregisterProxyCommand ( string_ref  name)
void openmsx::GlobalCommandController::unregisterProxySetting ( Setting setting)
void openmsx::GlobalCommandController::unregisterSetting ( Setting setting)
virtual

Friends And Related Function Documentation

friend class HelpCmd
friend

Definition at line 110 of file GlobalCommandController.hh.


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