![]() |
Scanframe Modular Application 0.1.0
|
Script extending and linking the script to the generic information interface elements. More...
#include <GiiScriptInterpreter.h>
Public Member Functions | |
GiiScriptInterpreter ()=default | |
Default constructor. | |
strings | getInfoNames () const override |
Overloaded from base class. | |
const IdInfo * | getInfo (const std::string &name) const override |
Overloaded from base class. | |
![]() | |
ScriptInterpreter () | |
Default constructor. | |
~ScriptInterpreter () override | |
Virtual destructor. | |
ChangeListener::emitter_type & | getChangeEmitter () |
Gets the emitter for change events. | |
std::string | getScriptName () const |
Returns the name given by the user. | |
void | setScriptName (const std::string &name) |
Sets the name given by the user. | |
void | setOutputStream (std::ostream *os) |
Sets and enables debugging output stream. | |
EState | Execute (EExecMode exec_mode=emRun) |
Executes a macro depending on the execution mode. | |
bool | compile (const char *cmd) |
Compiles the passed script text and outputs debug info to the stream. | |
const char * | getStateName (EState exec_state=esCurrent) const |
Gets the execution state name from the passed state or the current one on state 'esCurrent'. | |
EState | getState () const |
std::string | getDebugText () const |
CodePos | getErrorPos () const |
ip_type | getInstructionPtr () const |
ip_type | getErrorInstructionPtr () const |
Gets the error instruction pointer in case of an error. | |
std::string | getInstructionText (ip_type ip) const |
Gets the instruction text at pointer IP. | |
void | flush () |
Calls the protected virtual clear function. | |
bool | callFunction (const std::string &name, bool step_mode) |
void | callFunction (ip_type ip, bool step_mode) |
Makes it possible to execute function/gosub. | |
void | setMaxLoopTime (unsigned long usec) |
Sets the maximum loop time for this instance. | |
strings | getInfoNames () const override |
Gets names of info structures in lines. | |
const IdInfo * | getInfo (const std::string &name) const override |
const TVector< Instruction > & | getInstructions () const |
Gets the instruction text at pointer IP. | |
const TVector< VariableInfo * > & | getVariables () const |
Gets the current variables declared in the script. | |
strings | getIdentifiers (EIdentifier id) const override |
Gets a list of available identifiers. | |
bool | isStepMode () const |
Get the step mode of the script. | |
![]() | |
ScriptEngine () | |
Default constructor. | |
bool | calculate (const std::string &script, Value &result) |
Calculates the passed script. | |
EArithError | getError () const |
Gets the error value of this instance. | |
std::string | getErrorReason () const |
Gets the associated error reason string. | |
bool | setError (EArithError error_value, const std::string &reason=std::string()) |
Sets the error value for this instance. | |
const char * | getErrorText (EArithError error_value=EArithError::aeCurrent) const |
pos_type | getPos () const |
Gets the current position. | |
![]() | |
ScriptObject (const char *type_name, ScriptObject *parent=nullptr) | |
virtual | ~ScriptObject ()=default |
Virtual destructor which can be overloaded to clean up objects. | |
virtual std::string | getStatusText () |
Gets the status text of this object for debugging purposes. | |
int | getRefCount () const |
Gets the reference count. | |
operator Value () const | |
Cast operator to be able to return this instance as a Value. | |
std::string | getTypeName () const |
Returns the type name Set at the constructor. | |
ScriptObject * | getParent () |
Gets the script object owner. | |
const ScriptObject * | getParent () const |
Gets the script object owner. | |
ScriptObject * | castToObject (const Value &value) |
Casts a sf::Value::vitCustom typed sf::Value to a ScriptObject typed pointer. | |
Protected Member Functions | |
bool | getSetValue (const IdInfo *, Value *value, Value::vector_type *params, bool flag_set) override |
Gets and sets a value using a returned TInfo structure. | |
![]() | |
bool | getSetValue (const IdInfo *info, Value *value, Value::vector_type *params, bool flag_set) override |
Overridden from ScriptEngine class. | |
virtual bool | compileAdditionalStatement (const IdInfo *info, const std::string &source) |
Compile external supplied keyword. | |
virtual void | exitFunction (EExitCode exitcode, const Value &value) |
Function is called at the exit of the script. | |
virtual void | clear () |
Clears compiled data can be overloaded by derived classes. | |
virtual void | linkInstruction () |
Links the labels of the calls in the script. | |
void | setState (EState exec_state) |
Sets the execution state. | |
ip_type | getLabelIp (const std::string &name) |
Gets the ip from the label name. | |
![]() | |
bool | isAlpha (char ch) |
Determines if the passed character is an alpha one. | |
![]() | |
void | makeParent (ScriptObject *so) |
Makes this object the owner of the other object. | |
void | setParent (ScriptObject *parent) |
Sets the owner to the pass script object. | |
Script extending and linking the script to the generic information interface elements.
|
default |
Default constructor.
|
overridevirtual |
Overloaded from base class.
Implements sf::ScriptObject.
|
overridevirtual |
Overloaded from base class.
Reimplemented from sf::ScriptEngine.
|
overrideprotectedvirtual |
Gets and sets a value using a returned TInfo structure.
Implements sf::ScriptObject.