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 (EventDistributor &eventDistributor, GlobalCliComm &cliComm, Reactor &reactor)
 
 GlobalCommandController (const GlobalCommandController &)=delete
 
 GlobalCommandController (GlobalCommandController &&)=delete
 
GlobalCommandControlleroperator= (const GlobalCommandController &)=delete
 
GlobalCommandControlleroperator= (GlobalCommandController &&)=delete
 
 ~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 (const Setting &setting)
 
void unregisterProxySetting (const 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/3]

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

Definition at line 34 of file GlobalCommandController.cc.

◆ GlobalCommandController() [2/3]

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

◆ GlobalCommandController() [3/3]

openmsx::GlobalCommandController::GlobalCommandController ( GlobalCommandController &&  )
delete

◆ ~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 304 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 121 of file GlobalCommandController.cc.

Referenced by source().

◆ getConnection()

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

Definition at line 93 of file GlobalCommandController.hh.

◆ getHotKey()

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

Definition at line 95 of file GlobalCommandController.hh.

◆ getInterpreter()

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

◆ getOpenMSXInfoCommand()

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

Definition at line 51 of file GlobalCommandController.hh.

◆ getReactor()

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

Definition at line 94 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 299 of file GlobalCommandController.cc.

References openmsx::Interpreter::isComplete().

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ registerCommand()

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

(Un)register a command

Implements openmsx::CommandController.

Definition at line 131 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 153 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 63 of file GlobalCommandController.cc.

References end().

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

◆ registerProxySetting()

void openmsx::GlobalCommandController::registerProxySetting ( const 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 322 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 73 of file GlobalCommandController.cc.

References end().

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

◆ unregisterProxySetting()

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

◆ unregisterSetting()

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

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