#include <script.h>
Inheritance diagram for ost::ScriptInterp::
Public Methods | |
scriptsymbol_t * | getLocal (const char *name, size_t size=0) |
Search for symbols either thru the virtual global space or thru local space if a local space has been allocated on the heap. More... | |
bool | Attach (const char *scrname) |
Attempt to attach script engine to active session and specify a starting script. More... | |
void | Detach (void) |
Detach the current script image. More... | |
bool | Redirect (const char *scrname) |
Script redirection support. More... | |
bool | Step (const char *trapname=NULL) |
Execute the next pending script statement. More... | |
bool | isActive (void) |
Test if script interpreter is currently active. More... | |
char * | getOption (const char *def=NULL) |
Fetch next logical option but do not evaluate. More... | |
char * | getKeyword (const char *keyword) |
Fetch an embedded attribute keyword argument. More... | |
int | initKeywords (int size) |
Initialize symbols from the keyword list. More... | |
char * | getValue (const char *def=NULL) |
Fetch and evaluate next logical option. More... | |
char * | getContent (char *sym) |
Evaluate the content of an option retrieved with getOption. More... | |
scriptline_t * | getScript (void) |
Return the current script line object so it may be debugged. More... | |
const char * | getMember (void) |
Return the member id of a script command. More... | |
scriptname_t * | getObject (void) |
Return the master script object for resource context. More... | |
ScriptImage * | getImage (void) |
Return the script image holding this application's context. More... | |
void | autoloop (bool enable) |
Enable or disable autolooping of statements. More... | |
Protected Methods | |
ScriptInterp (ScriptCommand *cmd, size_t symsize, size_t pgsize=1024) | |
Derive a new instance of the system script interpreter. More... | |
void | getTrigger (bool use) |
Get a local and/or global trigger. More... | |
bool | getOnce (void) |
Fetch unique "once" flag and set. More... | |
void | Notify (unsigned long mask) |
Notify signal mask for "on" handlers. More... | |
void | Notify (const char *str) |
Notify signal by symbolic name. More... | |
unsigned long | getMask (void) |
Fetch the current interpreter mask bits directly. More... | |
ScriptCommand * | getCommand (void) |
Fetch the active command interpreter subsystem. More... | |
bool | Conditional (void) |
Used to process "conditional" arguments such as for IF/DO/LOOP statements. More... | |
bool | scrExit (void) |
Some systems can derive alternative "exit" commands which can call this routine after performing other operations. More... | |
bool | scrGoto (void) |
This is often called to process branching requests. More... | |
bool | scrData (void) |
Method used to encode "data" lines. More... | |
virtual unsigned | getId (void) |
Used to return channel identifiers in some systems. More... | |
virtual bool | getGlobalTrap (unsigned id) |
Used to fetch a global trap execution context branch. More... | |
scriptsymbol_t * | getVariable (size_t size=0) |
Fetch a variable (symbol) that will be used to store data. More... | |
virtual scriptsymbol_t * | getIndirect (char *sym) |
May be used to override processing of indirect content requests. More... | |
void | Advance (void) |
Advance program to the next script statement. More... | |
void | Error (const char *error) |
Set error variable and advance to either the error handler or next script statement. More... | |
void | Trap (unsigned id) |
Set the execution interpreter to a trap identifier. More... | |
void | Trap (const char *trapname) |
Select trap by symbolic name and execute if found, else advance to next script step (unless exit trap). More... | |
bool | Push (void) |
Attempt to push a value onto the stack. More... | |
bool | Pull (void) |
Attempt to recall a previous stack level. More... | |
bool | Signal (const char *trapname) |
Signals are used during "delayed" execution steps when a signal event has occured aynchronously with the execution of a script controlled state event handler. More... | |
bool | Signal (unsigned trapid) |
Signals can be referenced by numeric id as well as by symbolic name. More... | |
virtual bool | Execute (scriptmethod_t method) |
Runtime execution of script handler. More... | |
virtual void | Stop (unsigned long mask) |
Stop request handler. More... | |
virtual void | Exit (void)=0 |
Exit request handler. More... | |
virtual scriptname_t * | getScriptImage (const char *label) |
Runtime branch point for label selection. More... | |
scriptname_t * | getScriptCopy (const char *src) |
Fetch duplicative script image as needed. More... | |
virtual void | sleepScheduler (timeout_t timeout) |
Patch point for sleep delay notification. More... | |
virtual void | stepScheduler (const char *trapname) |
Step scheduler callback to force step execution. More... | |
Friends | |
class | ScriptImage |
class | ScriptSession |
class | ScriptModule |
class | ScriptCommand |
This class is further derived to impliment application specific language dialects.
|
Derive a new instance of the system script interpreter.
|
|
Advance program to the next script statement.
|
|
Attempt to attach script engine to active session and specify a starting script.
|
|
Used to process "conditional" arguments such as for IF/DO/LOOP statements. The index is kept at the next logical argument so a goto can be performed if needed.
|
|
Detach the current script image. If it is the last ref count and the exit flag is set, then delete it. |
|
Set error variable and advance to either the error handler or next script statement.
|
|
Runtime execution of script handler. This can be called in the current or derived class to invoke extensible methods.
|
|
Exit request handler. This is called when no script line exists. No default behavior is known. |
|
Notify signal by symbolic name.
|
|
Notify signal mask for "on" handlers.
|
|
Attempt to recall a previous stack level.
|
|
Attempt to push a value onto the stack.
|
|
Script redirection support.
|
|
Signals can be referenced by numeric id as well as by symbolic name.
|
|
Signals are used during "delayed" execution steps when a signal event has occured aynchronously with the execution of a script controlled state event handler. This mechanism can be used in place of calling implicit "Step" traps.
|
|
Execute the next pending script statement. If no statement is selected, then we execute the exit handler instead. We can also force feed a trap identifier.
|
|
Stop request handler. Used for handling external trap requests during a "Signal". This is needed in some state engines when the current state is being abandoned because of a signaled trap.
|
|
Select trap by symbolic name and execute if found, else advance to next script step (unless exit trap).
|
|
Set the execution interpreter to a trap identifier. If no trap id exists, then advance to next script statement (unless exit trap).
|
|
Enable or disable autolooping of statements.
|
|
Fetch the active command interpreter subsystem.
|
|
Evaluate the content of an option retrieved with getOption.
|
|
Used to fetch a global trap execution context branch.
|
|
Used to return channel identifiers in some systems.
|
|
Return the script image holding this application's context.
|
|
May be used to override processing of indirect content requests. This is used in the Bayonne IVR to fetch content constants based on language and country settings.
|
|
Fetch an embedded attribute keyword argument. This allows embedded tag=value keywords to be extracted.
|
|
Search for symbols either thru the virtual global space or thru local space if a local space has been allocated on the heap.
|
|
Fetch the current interpreter mask bits directly.
|
|
Return the member id of a script command.
|
|
Return the master script object for resource context.
|
|
Fetch unique "once" flag and set.
|
|
Fetch next logical option but do not evaluate. The index is advanced.
|
|
Return the current script line object so it may be debugged.
|
|
Fetch duplicative script image as needed.
|
|
Runtime branch point for label selection.
|
|
Get a local and/or global trigger.
|
|
Fetch and evaluate next logical option. If a symbol ref. then the symbol is also expressed. The index is advanced.
|
|
Fetch a variable (symbol) that will be used to store data. This advances the index.
|
|
Initialize symbols from the keyword list.
|
|
Test if script interpreter is currently active.
|
|
Method used to encode "data" lines.
|
|
Some systems can derive alternative "exit" commands which can call this routine after performing other operations.
|
|
This is often called to process branching requests.
|
|
Patch point for sleep delay notification.
|
|
Step scheduler callback to force step execution.
|
|
|
|
|
|
|
|
|