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

#include <Interpreter.hh>

Public Member Functions

 Interpreter (const Interpreter &)=delete
Interpreteroperator= (const Interpreter &)=delete
 Interpreter ()
 ~Interpreter ()
void setOutput (InterpreterOutput *output_)
void init (const char *programName)
void registerCommand (const std::string &name, Command &command)
void unregisterCommand (Command &command)
TclObject getCommandNames ()
bool isComplete (const std::string &command) const
TclObject execute (const std::string &command)
TclObject executeFile (const std::string &filename)
void setVariable (const TclObject &name, const TclObject &value)
void unsetVariable (const char *name)
void registerSetting (BaseSetting &variable)
void unregisterSetting (BaseSetting &variable)
void createNamespace (const std::string &name)
 Create the global namespace with given name. More...
void deleteNamespace (const std::string &name)
 Delete the global namespace with given name. More...
TclParser parse (std::string_view command)
void poll ()
void wrongNumArgs (unsigned argc, span< const TclObject > tokens, const char *message)


class TclObject

Detailed Description

Definition at line 16 of file Interpreter.hh.

Constructor & Destructor Documentation

◆ Interpreter() [1/2]

openmsx::Interpreter::Interpreter ( const Interpreter )

◆ Interpreter() [2/2]

openmsx::Interpreter::Interpreter ( )

◆ ~Interpreter()

openmsx::Interpreter::~Interpreter ( )

Definition at line 106 of file

References openmsx::MSXCPUInterface::cleanup().

Member Function Documentation

◆ createNamespace()

void openmsx::Interpreter::createNamespace ( const std::string &  name)

Create the global namespace with given name.

nameName of the namespace, should not include '::' prefix.

Definition at line 431 of file

References execute(), and strCat().

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

◆ deleteNamespace()

void openmsx::Interpreter::deleteNamespace ( const std::string &  name)

Delete the global namespace with given name.

nameName of the namespace, should not include '::' prefix.

Definition at line 436 of file

References execute().

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

◆ execute()

TclObject openmsx::Interpreter::execute ( const std::string &  command)

◆ executeFile()

TclObject openmsx::Interpreter::executeFile ( const std::string &  filename)

Definition at line 215 of file

References openmsx::filename, and TclObject.

Referenced by openmsx::GlobalCommandController::source().

◆ getCommandNames()

TclObject openmsx::Interpreter::getCommandNames ( )

Definition at line 196 of file

References execute().

◆ init()

void openmsx::Interpreter::init ( const char *  programName)

Definition at line 68 of file

Referenced by openmsx::CommandLineParser::parse().

◆ isComplete()

bool openmsx::Interpreter::isComplete ( const std::string &  command) const

Definition at line 201 of file

Referenced by openmsx::GlobalCommandController::isComplete().

◆ operator=()

Interpreter& openmsx::Interpreter::operator= ( const Interpreter )

◆ parse()

TclParser openmsx::Interpreter::parse ( std::string_view  command)

Definition at line 447 of file

Referenced by openmsx::GlobalCommandController::tabCompletion().

◆ poll()

void openmsx::Interpreter::poll ( )

Definition at line 441 of file

Referenced by openmsx::EventDistributor::deliverEvents().

◆ registerCommand()

void openmsx::Interpreter::registerCommand ( const std::string &  name,
Command command 

◆ registerSetting()

void openmsx::Interpreter::registerSetting ( BaseSetting variable)

◆ setOutput()

void openmsx::Interpreter::setOutput ( InterpreterOutput output_)

◆ setVariable()

void openmsx::Interpreter::setVariable ( const TclObject name,
const TclObject value 

◆ unregisterCommand()

void openmsx::Interpreter::unregisterCommand ( Command command)

◆ unregisterSetting()

void openmsx::Interpreter::unregisterSetting ( BaseSetting variable)

◆ unsetVariable()

void openmsx::Interpreter::unsetVariable ( const char *  name)

Definition at line 248 of file

Referenced by unregisterSetting().

◆ wrongNumArgs()

void openmsx::Interpreter::wrongNumArgs ( unsigned  argc,
span< const TclObject tokens,
const char *  message 

Friends And Related Function Documentation

◆ TclObject

friend class TclObject

Definition at line 68 of file Interpreter.hh.

Referenced by execute(), executeFile(), Interpreter(), and registerSetting().

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