This class parses and executes Simkin script, and holds a list of global variables
This class parses and executes Simkin script, and holds a list of global variables.There is one global Interpreter object which you should set up at the start, although others can also be created.
skMethodDefNode* parseExternalParams(const skString& location, skStringList& paramNames, const skString& code)
paramNames - - a list of parameter names (hence the name "ExternalParams"
code - - a string of Simkin code, which does *not* include the parameter declarations
void executeString(const skString& location, skExecutable * obj, const skString& code, skRValueArray& args, skRValue& return_value, skMethodDefNode ** parseTree)
skRuntimeException - if an error occurs while the script is running
obj - - the executable object which "owns" the script
args - - an array of arguments to the function, which are passed as parameters to the script
code - - a string of Simkin script, including parameter declarations
return_value - - an RValue which receives the result of the method call
parseTree - - if you supply this pointer, the parse tree is assigned to it, and you must delete it yourself. Without the parameter the parse tree will be deleted by the interpreter. The parse tree can be used in a cache and passed to executeParseTree later.
void executeStringExternalParams(const skString& location, skExecutable * obj, skStringList& paramNames, const skString& code, skRValueArray& args, skRValue& r, skMethodDefNode ** keepParseTree)
skRuntimeException - if an error occurs while the script is running
obj - - the executable object which "owns" the script
paramNames - - a list of parameter names (hence the name "ExternalParams"
args - - an array of arguments to the function, which are passed as parameters to the script
code - - a string of Simkin script, which does *not* include parameter declarations
return_value - - an RValue which receives the result of the method call
parseTree - - if you supply this pointer, the parse tree is assigned to it, and you must delete it yourself. Without the parameter the parse tree will be deleted by the interpreter. The parse tree can be used in a cache and passed to executeParseTree later.
void executeParseTree(const skString& location, skExecutable * obj, skMethodDefNode * parseTree, skRValueArray& args, skRValue& return_value)
obj - - the executable object which "owns" the script
parseTree - - a parse tree that has been generated by one of the parse or execute functions of the Interpreter
args - - an array of arguments to the function, which are passed as parameters to the script
return_value - - an RValue which receives the result of the method call
void addGlobalVariable(const skString& name, skRValue value)
value - - the value of the global variable, which can be any RValue void removeGlobalVariable(const skString& name)
bool findGlobalVariable(const skString& name, skRValue& return_value)
return_value - - an RValue which receives the value of the variable
bool setValue(const skString& s, const skString& attribute, const skRValue& v)
static skInterpreter* getInterpreter()
static void setInterpreter(skInterpreter *)
skInterpreter()
~skInterpreter()
alphabetic index hierarchy of classes
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de