OpenASIP
2.0
|
#include <SimulatorInterpreter.hh>
Public Member Functions | |
SimulatorInterpreter (int argc, char *argv[], SimulatorInterpreterContext &context, LineReader &reader) | |
virtual | ~SimulatorInterpreter () |
bool | isQuitCommandGiven () const |
void | setQuitCommandGiven () |
Public Member Functions inherited from TclInterpreter | |
TclInterpreter () | |
virtual | ~TclInterpreter () |
virtual void | initialize (int argc, char *argv[], InterpreterContext *context, LineReader *reader) |
virtual void | setVariableToInterpreter (const std::string &name, const DataObject &value) |
virtual DataObject | variable (const std::string &name) |
virtual bool | interpret (const std::string &commandLine) |
virtual void | setResultToInterpreter (const DataObject &value) |
virtual bool | processScriptFile (const std::string &scriptFileName) |
virtual InterpreterContext & | context () const |
Public Member Functions inherited from ScriptInterpreter | |
ScriptInterpreter () | |
virtual | ~ScriptInterpreter () |
virtual void | addCustomCommand (CustomCommand *command) |
virtual void | removeCustomCommand (const std::string &commandName) |
virtual CustomCommand * | customCommand (const std::string &commandName) |
virtual void | setResult (DataObject *result) |
virtual void | setResult (const std::string &result) |
virtual void | setResult (int result) |
virtual void | setResult (double result) |
virtual std::string | result () |
virtual void | setError (bool state) |
virtual void | setError (std::string errorMessage) |
virtual bool | error () const |
virtual void | setVariable (const std::string &interpreterVariableName, const std::string &value) |
virtual void | setVariable (const std::string &interpreterVariableName, int value) |
virtual std::string | variableStringValue (const std::string &interpreterVariableName) |
virtual int | variableIntegerValue (const std::string &interpreterVariableName) |
virtual void | finalize () |
virtual void | setLineReader (LineReader *reader) |
virtual LineReader * | lineReader () const |
std::vector< std::string > | customCommandsSortedByName () |
Private Attributes | |
bool | quitted_ |
Additional Inherited Members | |
Static Public Member Functions inherited from TclInterpreter | |
static DataObject | tclObjToDataObject (Tcl_Obj *object) |
static Tcl_Obj * | dataObjectToTclObj (const DataObject &object) |
static int | customCommandRedirector (ClientData cd, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) |
Protected Member Functions inherited from TclInterpreter | |
virtual void | addCustomCommandToInterpreter (const CustomCommand &command) |
virtual void | removeCustomCommandFromInterpreter (const CustomCommand &command) |
Implementation of the interpreter for the Simulator Control Language.
Uses TCL as the base interpreter class and adds the custom commands of the Simulator Control Language to it.
Definition at line 49 of file SimulatorInterpreter.hh.
SimulatorInterpreter::SimulatorInterpreter | ( | int | argc, |
char * | argv[], | ||
SimulatorInterpreterContext & | context, | ||
LineReader & | reader | ||
) |
Constructor.
Initializes the interpreter. argc and argv variables are set to be visible as interpreter variables.
argc | The number of command line arguments. |
argv | The command line arguments. |
context | The context data for the interpreter. |
reader | LineReader used by the interpreter. |
Definition at line 76 of file SimulatorInterpreter.cc.
References ScriptInterpreter::addCustomCommand(), TclInterpreter::context(), TclInterpreter::initialize(), and ScriptInterpreter::lineReader().
|
virtual |
Destructor.
Finalizes the internal structures of the interpreter.
Definition at line 123 of file SimulatorInterpreter.cc.
References ScriptInterpreter::finalize().
bool SimulatorInterpreter::isQuitCommandGiven | ( | ) | const |
Returns true in case interpreter has received the quit command.
True | if quite command has been given. |
Definition at line 134 of file SimulatorInterpreter.cc.
References quitted_.
Referenced by SimulatorCLI::run(), and DesignSpaceExplorer::simulate().
void SimulatorInterpreter::setQuitCommandGiven | ( | ) |
Sets the quit command to be given.
Definition at line 142 of file SimulatorInterpreter.cc.
References quitted_.
|
private |
Definition at line 62 of file SimulatorInterpreter.hh.
Referenced by isQuitCommandGiven(), and setQuitCommandGiven().