Yate
|
Script execution context. More...
#include <yatescript.h>
Public Member Functions | |
ScriptContext (const char *name=0) | |
NamedList & | params () |
const NamedList & | params () const |
virtual const String & | toString () const |
virtual void * | getObject (const String &name) const |
virtual RefObject * | refObj () |
virtual Mutex * | mutex ()=0 |
virtual bool | hasField (ObjList &stack, const String &name, GenObject *context) const |
virtual NamedString * | getField (ObjList &stack, const String &name, GenObject *context) const |
virtual bool | runFunction (ObjList &stack, const ExpOperation &oper, GenObject *context) |
virtual bool | runField (ObjList &stack, const ExpOperation &oper, GenObject *context) |
virtual bool | runAssign (ObjList &stack, const ExpOperation &oper, GenObject *context) |
Script execution context.
A script execution context, holds global variables and objects
ScriptContext | ( | const char * | name = 0 | ) | [inline, explicit] |
Constructor
name | Name of the context |
virtual NamedString* getField | ( | ObjList & | stack, |
const String & | name, | ||
GenObject * | context | ||
) | const [virtual] |
Get a pointer to a field in the context
stack | Evaluation stack in use |
name | Name of the field to retrieve |
context | Pointer to arbitrary object passed from evaluation methods |
Reimplemented from ExpExtender.
Get a pointer to a derived class given that class name
name | Name of the class we are asking for |
Reimplemented from RefObject.
Check if a certain field is assigned in context
stack | Evaluation stack in use |
name | Name of the field to test |
context | Pointer to arbitrary object passed from evaluation methods |
Reimplemented from ExpExtender.
Access to the NamedList operator
Const access to the NamedList operator
Retrieve the reference counted object owning this interface
Reimplemented from ExpExtender.
virtual bool runAssign | ( | ObjList & | stack, |
const ExpOperation & | oper, | ||
GenObject * | context | ||
) | [virtual] |
Try to assign a value to a single field
stack | Evaluation stack in use |
oper | Field to assign to, contains the field name and new value |
context | Pointer to context data passed from evaluation methods |
Reimplemented from ExpExtender.
Reimplemented in JsObject.
virtual bool runField | ( | ObjList & | stack, |
const ExpOperation & | oper, | ||
GenObject * | context | ||
) | [virtual] |
Try to evaluate a single field in the context
stack | Evaluation stack in use, field value must be pushed on it |
oper | Field to evaluate |
context | Pointer to context data passed from evaluation methods |
Reimplemented from ExpExtender.
Reimplemented in JsObject.
virtual bool runFunction | ( | ObjList & | stack, |
const ExpOperation & | oper, | ||
GenObject * | context | ||
) | [virtual] |
Try to evaluate a single function in the context
stack | Evaluation stack in use, parameters are popped off this stack and results are pushed back on stack |
oper | Function to evaluate |
context | Pointer to context data passed from evaluation methods |
Reimplemented from ExpExtender.
Reimplemented in JsObject.