|
openMSX
|
#include <Interpreter.hh>


Public Member Functions | |
| Interpreter (EventDistributor &eventDistributor) | |
| ~Interpreter () | |
| void | setOutput (InterpreterOutput *output) |
| void | init (const char *programName) |
| void | registerCommand (const std::string &name, Command &command) |
| void | unregisterCommand (string_ref name, Command &command) |
| std::vector< std::string > | getCommandNames () |
| bool | isComplete (const std::string &command) const |
| std::string | execute (const std::string &command) |
| std::string | executeFile (const std::string &filename) |
| void | setVariable (const std::string &name, const std::string &value) |
| void | unsetVariable (const std::string &name) |
| const char * | getVariable (const std::string &name) const |
| void | registerSetting (Setting &variable, const std::string &name) |
| void | unregisterSetting (Setting &variable, const std::string &name) |
| void | createNamespace (const std::string &name) |
| Create the global namespace with given name. | |
| void | deleteNamespace (const std::string &name) |
| Delete the global namespace with given name. | |
| std::vector< std::string > | splitList (const std::string &list) |
| TclParser | parse (string_ref command) |
Static Public Member Functions | |
| static std::vector< std::string > | splitList (const std::string &list, Tcl_Interp *interp) |
Friends | |
| class | TclObject |
Additional Inherited Members | |
Private Member Functions inherited from openmsx::EventListener | |
| virtual | ~EventListener () |
| virtual int | signalEvent (const std::shared_ptr< const Event > &event)=0 |
| This method gets called when an event you are subscribed to occurs. | |
| EventListener () | |
Definition at line 21 of file Interpreter.hh.
|
explicit |
Definition at line 72 of file Interpreter.cc.
References openmsx::FileOperations::getSystemDataDir(), openmsx::FileOperations::getUserDataDir(), openmsx::OPENMSX_POLL_EVENT, openmsx::EventDistributor::registerEventListener(), and setVariable().
| openmsx::Interpreter::~Interpreter | ( | ) |
Definition at line 107 of file Interpreter.cc.
References openmsx::MSXCPUInterface::cleanup(), openmsx::OPENMSX_POLL_EVENT, and openmsx::EventDistributor::unregisterEventListener().
| void openmsx::Interpreter::createNamespace | ( | const std::string & | name | ) |
Create the global namespace with given name.
| name | Name of the namespace, should not include '::' prefix. |
Definition at line 430 of file Interpreter.cc.
References execute().
Referenced by openmsx::MSXCommandController::MSXCommandController().
| void openmsx::Interpreter::deleteNamespace | ( | const std::string & | name | ) |
Delete the global namespace with given name.
| name | Name of the namespace, should not include '::' prefix. |
Definition at line 435 of file Interpreter.cc.
References execute().
Referenced by openmsx::MSXCommandController::~MSXCommandController().
| string openmsx::Interpreter::execute | ( | const std::string & | command | ) |
Definition at line 211 of file Interpreter.cc.
Referenced by createNamespace(), deleteNamespace(), and getCommandNames().
| string openmsx::Interpreter::executeFile | ( | const std::string & | filename | ) |
Definition at line 221 of file Interpreter.cc.
| vector< string > openmsx::Interpreter::getCommandNames | ( | ) |
Definition at line 201 of file Interpreter.cc.
References execute(), and splitList().
| const char * openmsx::Interpreter::getVariable | ( | const std::string & | name | ) | const |
Definition at line 256 of file Interpreter.cc.
Referenced by registerSetting().
| void openmsx::Interpreter::init | ( | const char * | programName | ) |
Definition at line 67 of file Interpreter.cc.
Referenced by openmsx::CommandLineParser::parse().
| bool openmsx::Interpreter::isComplete | ( | const std::string & | command | ) | const |
Definition at line 206 of file Interpreter.cc.
| TclParser openmsx::Interpreter::parse | ( | string_ref | command | ) |
Definition at line 473 of file Interpreter.cc.
| void openmsx::Interpreter::registerCommand | ( | const std::string & | name, |
| Command & | command | ||
| ) |
Definition at line 142 of file Interpreter.cc.
References StringMap< T >::end(), and StringMap< T >::find().
| void openmsx::Interpreter::registerSetting | ( | Setting & | variable, |
| const std::string & | name | ||
| ) |
Definition at line 269 of file Interpreter.cc.
References getVariable(), openmsx::Setting::setValueStringDirect(), and setVariable().
Referenced by openmsx::GlobalCommandController::registerProxySetting(), and openmsx::MSXCommandController::registerSetting().
| void openmsx::Interpreter::setOutput | ( | InterpreterOutput * | output | ) |
Definition at line 122 of file Interpreter.cc.
Referenced by openmsx::CommandConsole::CommandConsole(), and openmsx::CommandConsole::~CommandConsole().
| void openmsx::Interpreter::setVariable | ( | const std::string & | name, |
| const std::string & | value | ||
| ) |
Definition at line 243 of file Interpreter.cc.
Referenced by Interpreter(), and registerSetting().
| vector< string > openmsx::Interpreter::splitList | ( | const std::string & | list | ) |
Definition at line 440 of file Interpreter.cc.
Referenced by openmsx::InputEventFactory::createInputEvent(), and getCommandNames().
|
static |
Definition at line 445 of file Interpreter.cc.
| void openmsx::Interpreter::unregisterCommand | ( | string_ref | name, |
| Command & | command | ||
| ) |
Definition at line 150 of file Interpreter.cc.
References StringMap< T >::end(), StringMap< T >::erase(), and StringMap< T >::find().
| void openmsx::Interpreter::unregisterSetting | ( | Setting & | variable, |
| const std::string & | name | ||
| ) |
Definition at line 320 of file Interpreter.cc.
References unsetVariable().
Referenced by openmsx::GlobalCommandController::unregisterProxySetting(), and openmsx::MSXCommandController::unregisterSetting().
| void openmsx::Interpreter::unsetVariable | ( | const std::string & | name | ) |
Definition at line 251 of file Interpreter.cc.
Referenced by unregisterSetting().
|
friend |
Definition at line 79 of file Interpreter.hh.
1.8.1.2