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. More...
 
void registerProxyCommand (const std::string &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 More...
 
void unregisterCompleter (CommandCompleter &completer, std::string_view str) override
 
void registerCommand (Command &command, const std::string &str) override
 (Un)register a command More...
 
void unregisterCommand (Command &command, std::string_view str) override
 
bool hasCommand (std::string_view command) const override
 Does a command with this name already exist? More...
 
TclObject executeCommand (const std::string &command, CliConnection *connection=nullptr) override
 Execute the given command. More...
 
void registerSetting (Setting &setting) override
 TODO. More...
 
void unregisterSetting (Setting &setting) override
 
CliCommgetCliComm () override
 
InterpretergetInterpreter () override
 
std::string tabCompletion (std::string_view command)
 Complete the given command. More...
 
bool isComplete (const std::string &command)
 Returns true iff the command is complete (all braces, quotes etc. More...
 
SettingsConfiggetSettingsConfig ()
 
SettingsManagergetSettingsManager ()
 
CliConnectiongetConnection () const
 

Additional Inherited Members

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

Detailed Description

Definition at line 35 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.

References ~GlobalCommandController().

◆ ~GlobalCommandController()

openmsx::GlobalCommandController::~GlobalCommandController ( )
default

Referenced by GlobalCommandController().

Member Function Documentation

◆ executeCommand()

TclObject openmsx::GlobalCommandController::executeCommand ( const std::string &  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

◆ getConnection()

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

Definition at line 90 of file GlobalCommandController.hh.

References openmsx::Completer::getName(), and StringOp::split().

Referenced by source().

◆ getInterpreter()

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

◆ getOpenMSXInfoCommand()

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

Definition at line 47 of file GlobalCommandController.hh.

◆ getSettingsConfig()

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

◆ getSettingsManager()

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

◆ hasCommand()

bool openmsx::GlobalCommandController::hasCommand ( std::string_view  command) const
overridevirtual

◆ isComplete()

bool openmsx::GlobalCommandController::isComplete ( const std::string &  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,
const std::string &  str 
)
overridevirtual

◆ 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 144 of file GlobalCommandController.cc.

References openmsx::GlobalCommandControllerBase::commandCompleters, and StringOp::startsWith().

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

◆ registerProxyCommand()

void openmsx::GlobalCommandController::registerProxyCommand ( const std::string &  name)

◆ 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()

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

Complete the given command.

Referenced by source().

◆ 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)

◆ 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: