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

#include <Interpreter.hh>

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

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 (BaseSetting &variable, const std::string &name)
 
void unregisterSetting (BaseSetting &variable, const std::string &name)
 
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...
 
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
 

Detailed Description

Definition at line 19 of file Interpreter.hh.

Constructor & Destructor Documentation

openmsx::Interpreter::Interpreter ( EventDistributor eventDistributor)
explicit
openmsx::Interpreter::~Interpreter ( )

Member Function Documentation

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

Create the global namespace with given name.

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

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

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

Definition at line 434 of file Interpreter.cc.

References execute().

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

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

Definition at line 210 of file Interpreter.cc.

Referenced by createNamespace(), deleteNamespace(), and getCommandNames().

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

Definition at line 220 of file Interpreter.cc.

vector< string > openmsx::Interpreter::getCommandNames ( )

Definition at line 200 of file Interpreter.cc.

References execute(), and splitList().

const char * openmsx::Interpreter::getVariable ( const std::string &  name) const

Definition at line 255 of file Interpreter.cc.

Referenced by registerSetting().

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

Definition at line 66 of file Interpreter.cc.

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

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

Definition at line 205 of file Interpreter.cc.

TclParser openmsx::Interpreter::parse ( string_ref  command)

Definition at line 472 of file Interpreter.cc.

void openmsx::Interpreter::registerCommand ( const std::string &  name,
Command command 
)
void openmsx::Interpreter::registerSetting ( BaseSetting variable,
const std::string &  name 
)
void openmsx::Interpreter::setOutput ( InterpreterOutput output)
void openmsx::Interpreter::setVariable ( const std::string &  name,
const std::string &  value 
)

Definition at line 242 of file Interpreter.cc.

Referenced by Interpreter(), and registerSetting().

vector< string > openmsx::Interpreter::splitList ( const std::string &  list)
vector< string > openmsx::Interpreter::splitList ( const std::string &  list,
Tcl_Interp *  interp 
)
static

Definition at line 444 of file Interpreter.cc.

void openmsx::Interpreter::unregisterCommand ( string_ref  name,
Command command 
)
void openmsx::Interpreter::unregisterSetting ( BaseSetting variable,
const std::string &  name 
)
void openmsx::Interpreter::unsetVariable ( const std::string &  name)

Definition at line 250 of file Interpreter.cc.

Referenced by unregisterSetting().

Friends And Related Function Documentation

friend class TclObject
friend

Definition at line 77 of file Interpreter.hh.


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