openMSX
Classes | Public Member Functions | List of all members
openmsx::GlobalCommandController Class Referencefinal

#include <GlobalCommandController.hh>

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

Public Member Functions

 GlobalCommandController (const GlobalCommandController &)=delete
 
GlobalCommandControlleroperator= (const GlobalCommandController &)=delete
 
 GlobalCommandController (EventDistributor &eventDistributor, GlobalCliComm &cliComm, Reactor &reactor)
 
 ~GlobalCommandController ()
 
InfoCommandgetOpenMSXInfoCommand ()
 
void source (const std::string &script)
 Executes all defined auto commands.
 
void registerProxyCommand (std::string_view name)
 
void unregisterProxyCommand (std::string_view name)
 
void registerProxySetting (Setting &setting)
 
void unregisterProxySetting (Setting &setting)
 
void registerCompleter (CommandCompleter &completer, std::string_view str) override
 (Un)register a command completer, used to complete build-in Tcl cmds
 
void unregisterCompleter (CommandCompleter &completer, std::string_view str) override
 
void registerCommand (Command &command, zstring_view str) override
 (Un)register a command
 
void unregisterCommand (Command &command, std::string_view str) override
 
TclObject executeCommand (zstring_view command, CliConnection *connection=nullptr) override
 Execute the given command.
 
void registerSetting (Setting &setting) override
 TODO.
 
void unregisterSetting (Setting &setting) override
 
CliCommgetCliComm () override
 
InterpretergetInterpreter () override
 
std::string tabCompletion (std::string_view command)
 Complete the given command.
 
bool isComplete (zstring_view command)
 Returns true iff the command is complete (all braces, quotes etc.
 
SettingsConfiggetSettingsConfig ()
 
SettingsManagergetSettingsManager ()
 
CliConnectiongetConnection () const
 
ReactorgetReactor () const
 
const HotKeygetHotKey () const
 

Additional Inherited Members

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

Detailed Description

Definition at line 38 of file GlobalCommandController.hh.

Constructor & Destructor Documentation

◆ GlobalCommandController() [1/2]

openmsx::GlobalCommandController::GlobalCommandController ( const GlobalCommandController )
delete

◆ GlobalCommandController() [2/2]

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

Definition at line 30 of file GlobalCommandController.cc.

◆ ~GlobalCommandController()

openmsx::GlobalCommandController::~GlobalCommandController ( )
default

Member Function Documentation

◆ executeCommand()

TclObject openmsx::GlobalCommandController::executeCommand ( zstring_view  command,
CliConnection connection = nullptr 
)
overridevirtual

Execute the given command.

Implements openmsx::CommandController.

Definition at line 300 of file GlobalCommandController.cc.

References openmsx::Interpreter::execute().

Referenced by openmsx::MSXCommandController::executeCommand().

◆ getCliComm()

CliComm & openmsx::GlobalCommandController::getCliComm ( )
overridevirtual

Implements openmsx::CommandController.

Definition at line 117 of file GlobalCommandController.cc.

Referenced by source().

◆ getConnection()

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

Definition at line 92 of file GlobalCommandController.hh.

◆ getHotKey()

const HotKey & openmsx::GlobalCommandController::getHotKey ( ) const
inline

Definition at line 94 of file GlobalCommandController.hh.

◆ getInterpreter()

Interpreter & openmsx::GlobalCommandController::getInterpreter ( )
overridevirtual

◆ getOpenMSXInfoCommand()

InfoCommand & openmsx::GlobalCommandController::getOpenMSXInfoCommand ( )
inline

Definition at line 50 of file GlobalCommandController.hh.

◆ getReactor()

Reactor & openmsx::GlobalCommandController::getReactor ( ) const
inline

Definition at line 93 of file GlobalCommandController.hh.

◆ getSettingsConfig()

SettingsConfig & openmsx::GlobalCommandController::getSettingsConfig ( )
inline

◆ getSettingsManager()

SettingsManager & openmsx::GlobalCommandController::getSettingsManager ( )
inline

◆ isComplete()

bool openmsx::GlobalCommandController::isComplete ( zstring_view  command)

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

are balanced).

Definition at line 295 of file GlobalCommandController.cc.

References openmsx::Interpreter::isComplete().

◆ operator=()

GlobalCommandController & openmsx::GlobalCommandController::operator= ( const GlobalCommandController )
delete

◆ registerCommand()

void openmsx::GlobalCommandController::registerCommand ( Command command,
zstring_view  str 
)
overridevirtual

(Un)register a command

Implements openmsx::CommandController.

Definition at line 127 of file GlobalCommandController.cc.

References openmsx::Interpreter::registerCommand().

Referenced by openmsx::MSXCommandController::registerCommand().

◆ registerCompleter()

void openmsx::GlobalCommandController::registerCompleter ( CommandCompleter completer,
std::string_view  str 
)
overridevirtual

(Un)register a command completer, used to complete build-in Tcl cmds

Implements openmsx::CommandController.

Definition at line 149 of file GlobalCommandController.cc.

References openmsx::GlobalCommandControllerBase::commandCompleters.

Referenced by openmsx::MSXCommandController::registerCompleter().

◆ registerProxyCommand()

void openmsx::GlobalCommandController::registerProxyCommand ( std::string_view  name)

Definition at line 59 of file GlobalCommandController.cc.

References end().

Referenced by openmsx::MSXCommandController::registerCommand().

◆ registerProxySetting()

void openmsx::GlobalCommandController::registerProxySetting ( Setting setting)

◆ registerSetting()

void openmsx::GlobalCommandController::registerSetting ( Setting setting)
overridevirtual

◆ source()

void openmsx::GlobalCommandController::source ( const std::string &  script)

◆ tabCompletion()

string openmsx::GlobalCommandController::tabCompletion ( std::string_view  command)

Complete the given command.

Definition at line 318 of file GlobalCommandController.cc.

References TclParser::getLast(), join(), openmsx::Interpreter::parse(), strCat(), and tabCompletion().

Referenced by tabCompletion().

◆ unregisterCommand()

void openmsx::GlobalCommandController::unregisterCommand ( Command command,
std::string_view  str 
)
overridevirtual

◆ unregisterCompleter()

void openmsx::GlobalCommandController::unregisterCompleter ( CommandCompleter completer,
std::string_view  str 
)
overridevirtual

◆ unregisterProxyCommand()

void openmsx::GlobalCommandController::unregisterProxyCommand ( std::string_view  name)

Definition at line 69 of file GlobalCommandController.cc.

References end().

Referenced by openmsx::MSXCommandController::unregisterCommand().

◆ unregisterProxySetting()

void openmsx::GlobalCommandController::unregisterProxySetting ( Setting setting)

◆ unregisterSetting()

void openmsx::GlobalCommandController::unregisterSetting ( Setting setting)
overridevirtual

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