OpenASIP
2.0
|
#include <Script.hh>
Public Member Functions | |
Script (ScriptInterpreter *interpreter, std::string scriptLine) | |
Script (ScriptInterpreter *interpreter, std::vector< std::string > &script) | |
virtual | ~Script () |
virtual DataObject | execute () |
DataObject | lastResult () |
virtual std::vector< std::string > | script () const |
Protected Attributes | |
ScriptInterpreter * | interpreter_ |
Interpreter executing the commands. More... | |
Private Attributes | |
DataObject | result_ |
Result of execution. More... | |
bool | executeCalled_ |
Flag indicating whether script has been executed or not. More... | |
std::vector< std::string > | scriptLines_ |
Contains script. More... | |
Helper class that contains line(s) of script that can be executed on demand.
Script::Script | ( | ScriptInterpreter * | interpreter, |
std::string | scriptLine | ||
) |
Constructor.
interpreter | Interpreter for script. |
scriptLine | A line of script. |
Definition at line 47 of file Script.cc.
References scriptLines_.
Script::Script | ( | ScriptInterpreter * | interpreter, |
std::vector< std::string > & | script | ||
) |
Constructor.
interpreter | Interpreter for script. |
script | Script lines. |
Definition at line 58 of file Script.cc.
References interpreter_, script(), and scriptLines_.
|
virtual |
Executes the script.
ScriptExecutionFailure | If execution of script fails. |
NumberFormatException | If DataObject operation fails. |
Definition at line 82 of file Script.cc.
References executeCalled_, Application::initialize(), ScriptInterpreter::interpret(), interpreter_, ScriptInterpreter::result(), result_, scriptLines_, and DataObject::setString().
Referenced by SimControlLanguageCommand::askConditionFromUser(), SimControlLanguageCommand::askExpressionFromUser(), ConditionScript::conditionOk(), ExpressionScript::resultChanged(), ProximToolbox::testCondition(), and ProximToolbox::testExpression().
DataObject Script::lastResult | ( | ) |
Referenced by ExpressionScript::resultChanged().
|
virtual |
Returns the script.
Reimplemented in TclConditionScript.
Definition at line 106 of file Script.cc.
References scriptLines_.
Referenced by ConditionScript::conditionOk(), Watch::description(), StopPoint::description(), ProximBreakpointWindow::refreshStopPoints(), Script(), WatchPropertiesDialog::TransferDataToWindow(), and BreakpointPropertiesDialog::TransferDataToWindow().
|
private |
|
protected |
Interpreter executing the commands.
Definition at line 58 of file Script.hh.
Referenced by ConditionScript::conditionOk(), execute(), ExpressionScript::resultChanged(), and Script().
|
private |
|
private |