Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages | Examples

ScriptInterp Class Reference

System script interpreter core engine class.Extensible Bayonne Scripting Engine. More...

#include <bayonnescript.h>

Inheritance diagram for ScriptInterp:

ScriptSymbol SharedMemPager Script MemPager Mutex Trunk List of all members.

Public Member Functions

virtual const char * getPrefixPath (void)
long getIntValue (const char *text, unsigned prec, Property *property=NULL)
int getExpression (long *list, int max, unsigned prec, Property *property=NULL)
void setLocal (void)
 Set a new local context.
void clrLocal (void)
 Clear the current local context and use the global context.
ScriptSymbolgetSymbols (void)
 Get local stack context symbol space.
bool setVariable (const char *id, unsigned size, const char *value=NULL)
 Provides interface for setting local or global variable passed by reference to drivers and such.
const char * getVariable (const char *id)
 Accesses local or global variable by direct name reference.
ScriptCommandgetCommand (void)
 Fetch the active command interpreter subsystem.
virtual void cleardigits (bool all)
 This is a virtual to handle processing of the digits received buffer for commands that pop values from input.
virtual char getdigit (void)
 Fetch an available digit or event code from input buffer and clear it.
bool setData (const char *scrname)
 Set data read pointer to a known data source script.
char getPackToken (void)
 Get pack token.
void clrTransactions (void)
 Clear transaction processing group.
SymbolinitVariable (unsigned size=0)
 Fetch a variable (symbol) that will be used to store data.
void rewindTemp (void)
 Rewind temporary buffer for prescan results.
void setTemp (const char *value)
 Set prescan value into temporary buffer.
void advance (void)
 Advance program to the next script statement.
void error (const char *error)
 Set error variable and advance to either the error handler or next script statement.
SymbolgetLocal (const char *name, unsigned 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.
bool attach (const char *scrname)
 Attempt to attach script engine to active session and specify a starting script.
void detach (void)
 Detach the current script image.
bool redirect (const char *scrname)
 Script redirection support.
bool step (void)
 Execute the next pending script statement.
bool isActive (void)
 Test if script interpreter is currently active.
char * getOption (const char *def=NULL)
 Fetch next logical option but do not evaluate.
char * getKeyword (const char *keyword)
 Fetch an embedded attribute keyword argument.
unsigned initKeywords (unsigned size)
 Initialize symbols from the keyword list.
char * getValue (const char *def=NULL)
 Fetch and evaluate next logical option.
char * getString (void)
 Fetch and concatenate a temporary string expression until either a comma or closing parenthesis.
char * getTempBuffer (void)
 Fetch a temp workspace buffer.
void missing (const char *sym)
 Post missing variable message on warn.
char * getContent (char *sym)
 Evaluate the content of an option retrieved with getOption.
LinegetScript (void)
 Return the current script line object so it may be debugged.
bool hasEvents (void)
 Return if the script has generic event handlers.
const char * getMember (void)
 Return the member id of a script command.
Name * getObject (void)
 Return the master script object for resource context.
ScriptImagegetImage (void)
 Return the script image holding this application's context.
void warning (bool enable)
 Enable warnings on parsing undefined symbols.
unsigned getDecimal (void)
 Get decimal.

Static Public Member Functions

static long getRealValue (double val, unsigned prec)
static double getDouble (long value, unsigned prec)
static long getInteger (long value, unsigned prec)
static long getTens (unsigned prec)
static void addFunction (const char *name, unsigned count, Function i)
static void addConditional (const char *name, Cond test)
static void addAttribute (const char *name, Meta meta)

Protected Member Functions

bool scrRestart (void)
bool scrEnable (void)
bool scrDisable (void)
bool scrUse (void)
bool scrLoadable (void)
bool scrPack (void)
bool scrUnpack (void)
bool scrOn (void)
bool scrSlog (void)
bool scrBasename (void)
bool scrDirname (void)
bool scrFullpath (void)
bool scrGather (void)
bool scrDump (void)
bool scrInc (void)
bool scrDec (void)
bool scrFifo (void)
bool scrMin (void)
bool scrMax (void)
bool scrCounter (void)
bool scrReset (void)
bool scrRemove (void)
bool scrPost (void)
bool scrPostList (void)
bool scrStack (void)
bool scrCache (void)
bool scrArray (void)
bool scrIndex (void)
bool scrSequence (void)
bool scrDup (void)
bool scrArm (void)
bool scrDisarm (void)
bool scrNumber (void)
bool scrDecimal (void)
bool scrLocal (void)
bool scrSet (void)
bool scrAlias (void)
bool scrRef (void)
bool scrConst (void)
bool scrVar (void)
bool scrSize (void)
bool scrInit (void)
bool scrClear (void)
bool scrCall (void)
bool scrHas (void)
bool scrMissing (void)
bool scrLabel (void)
bool scrCase (void)
bool scrEndcase (void)
bool scrError (void)
bool scrStruct (void)
bool scrIfThen (void)
bool scrThen (void)
bool scrElse (void)
bool scrEndif (void)
bool scrBegin (void)
bool scrEnd (void)
bool scrFor (void)
bool scrRead (void)
bool scrMap (void)
bool scrRepeat (void)
bool scrForeach (void)
bool scrFordata (void)
bool scrFordatasource (void)
bool scrForarray (void)
bool scrTryeach (void)
bool scrSwap (void)
bool scrDo (void)
bool scrLoop (void)
bool scrBreak (void)
bool scrContinue (void)
bool scrReturn (void)
bool scrPop (void)
bool scrSelect (void)
bool scrOnce (void)
bool scrLock (void)
bool scrTry (void)
bool scrSkip (void)
bool expConditional (void)
void setCommand (ScriptCommand *sc)
 ScriptInterp (ScriptCommand *cmd, unsigned symsize, size_t pgsize=1024, const char *name=NULL)
 Derive a new instance of the system script interpreter.
 ~ScriptInterp ()
bool getOnce (void)
 Fetch unique "once" flag and set.
void Notify (unsigned long mask)
 Notify signal mask for "on" handlers.
void Notify (const char *str)
 Notify signal by symbolic name.
unsigned long getMask (void)
 Fetch the current interpreter mask bits directly.
void setLine (Line *line)
 Set the line handler to a new statement.
unsigned long getScriptMask (const char *id)
 Fetch the script mask identifer.
bool conditional (void)
 Used to process "conditional" arguments such as for IF/DO/LOOP statements.
bool scrExit (void)
 Some systems can derive alternative "exit" commands which can call this routine after performing other operations.
bool scrGoto (void)
 This is often called to process branching requests.
bool scrRaise (void)
 This is used to raise a named event branch.
bool intGoto (bool event=false)
 This is a new internal goto handler.
virtual void evtGoto (void)
 This is a virtual for posting goto events.
bool scrIf (void)
 override if support.
bool ifGoto (void)
 If version of goto.
bool scrData (void)
 Method used to encode "data" lines.
virtual unsigned getId (void)
 Used to return channel identifiers in some systems.
virtual bool getGlobalTrap (unsigned id)
 Used to fetch a global trap execution context branch.
void trap (unsigned id)
 Set the execution interpreter to a trap identifier.
void trap (const char *trapname)
 Select trap by symbolic name and execute if found, else advance to next script step (unless exit trap).
bool push (void)
 Attempt to push a value onto the stack.
bool pull (void)
 Attempt to recall a previous stack level.
void clearStack (void)
 Clear the stack of local loops or recursion for branching.
unsigned long getScriptMask (void)
 Get script mask through subroutine levels.
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.
virtual bool event (const char *evtname, bool inheret=true)
 Events reference to named handlers which have been attached to a script.
bool signal (unsigned trapid)
 Signals can be referenced by numeric id as well as by symbolic name.
virtual bool execute (Method method)
 Runtime execution of script handler.
virtual void stop (unsigned long mask)
 Stop request handler.
virtual void exit (void)=0
 Exit request handler.
Name * getScriptImage (const char *label)
 Runtime branch point for label selection.
Name * getScriptCopy (const char *src)
 Fetch duplicative script image as needed.
virtual void sleepScheduler (timeout_t timeout)
 Patch point for sleep delay notification.
virtual void stepScheduler (const char *trapname)
 Step scheduler callback to force step execution.
virtual void setExclusive (bool enable)
 Set exclusive sync locking for interpreter.
void initRuntime (Name *name)
 Initialize execution environment for a script.
virtual void initialize (void)
 New virtual to initialize script environment syms before running init sections.

Protected Attributes

ScriptCommandcmd
ScriptImageimage
Context script [31+1]
char * temps [16]
int tempidx
unsigned stack
unsigned symsize
size_t pgsize
unsigned long signalmask
bool once
bool warn
bool trace
bool initialized
unsigned steps
ScriptSymbolrecmode
char _idname [33]
unsigned char lckcount
ScriptDatadatasource

Friends

class __EXPORT ScriptImage
class __EXPORT ScriptModule
class __EXPORT ScriptData
class __EXPORT ScriptCommand

Classes

class  Context

Detailed Description

System script interpreter core engine class.Extensible Bayonne Scripting Engine.

This class is further derived to impliment application specific language dialects.

Author:
David Sugar <dyfet@ostel.com>


Constructor & Destructor Documentation

ScriptInterp::ScriptInterp ScriptCommand cmd,
unsigned  symsize,
size_t  pgsize = 1024,
const char *  name = NULL
[protected]
 

Derive a new instance of the system script interpreter.

Parameters:
symsize for default symbol sizing.
pgsize for memory fragmentation.

ScriptInterp::~ScriptInterp  )  [protected]
 


Member Function Documentation

static void ScriptInterp::addAttribute const char *  name,
Meta  meta
[static]
 

static void ScriptInterp::addConditional const char *  name,
Cond  test
[static]
 

static void ScriptInterp::addFunction const char *  name,
unsigned  count,
Function  i
[static]
 

void ScriptInterp::advance void   ) 
 

Advance program to the next script statement.

bool ScriptInterp::attach const char *  scrname  ) 
 

Attempt to attach script engine to active session and specify a starting script.

Returns:
false if failed to attach.
Parameters:
name of script entry.

Reimplemented in Trunk.

virtual void ScriptInterp::cleardigits bool  all  )  [inline, virtual]
 

This is a virtual to handle processing of the digits received buffer for commands that pop values from input.

Reimplemented in Trunk.

void ScriptInterp::clearStack void   )  [protected]
 

Clear the stack of local loops or recursion for branching.

void ScriptInterp::clrLocal void   ) 
 

Clear the current local context and use the global context.

If the current local context is only on our stack level, it is destroyed.

void ScriptInterp::clrTransactions void   )  [inline]
 

Clear transaction processing group.

bool ScriptInterp::conditional void   )  [protected]
 

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.

Returns:
true if conditional test is true.

void ScriptInterp::detach void   ) 
 

Detach the current script image.

If it is the last ref count and the exit flag is set, then delete it.

Reimplemented in Trunk.

void ScriptInterp::error const char *  error  ) 
 

Set error variable and advance to either the error handler or next script statement.

Parameters:
error message.

virtual bool ScriptInterp::event const char *  evtname,
bool  inheret = true
[protected, virtual]
 

Events reference to named handlers which have been attached to a script.

This allows low level applications to invoke an event handler much the way a signal handler occurs.

Returns:
true if event handler exists.
Parameters:
name of event handler.
inhereted search flag.

Reimplemented in Trunk.

virtual void ScriptInterp::evtGoto void   )  [inline, protected, virtual]
 

This is a virtual for posting goto events.

virtual bool ScriptInterp::execute Method  method  )  [inline, protected, virtual]
 

Runtime execution of script handler.

This can be called in the current or derived class to invoke extensible methods.

Returns:
true if immediately ready for next step.
Parameters:
derived method to call.

virtual void ScriptInterp::exit void   )  [protected, pure virtual]
 

Exit request handler.

This is called when no script line exists. No default behavior is known.

bool ScriptInterp::expConditional void   )  [protected]
 

ScriptCommand* ScriptInterp::getCommand void   )  [inline]
 

Fetch the active command interpreter subsystem.

Returns:
script interpreter.

Reimplemented in Trunk.

char* ScriptInterp::getContent char *  sym  ) 
 

Evaluate the content of an option retrieved with getOption.

Returns:
value of evaluation.
Parameters:
option string.

unsigned ScriptInterp::getDecimal void   )  [inline]
 

Get decimal.

Returns:
decimal value.

virtual char ScriptInterp::getdigit void   )  [inline, virtual]
 

Fetch an available digit or event code from input buffer and clear it.

Reimplemented in Trunk.

static double ScriptInterp::getDouble long  value,
unsigned  prec
[static]
 

int ScriptInterp::getExpression long *  list,
int  max,
unsigned  prec,
Property *  property = NULL
 

virtual bool ScriptInterp::getGlobalTrap unsigned  id  )  [inline, protected, virtual]
 

Used to fetch a global trap execution context branch.

Returns:
true if external global trap handler found.
Parameters:
trap identifier.

virtual unsigned ScriptInterp::getId void   )  [inline, protected, virtual]
 

Used to return channel identifiers in some systems.

Returns:
channel id or 0 for none.

Reimplemented in Trunk.

ScriptImage* ScriptInterp::getImage void   )  [inline]
 

Return the script image holding this application's context.

Returns:
script image.

static long ScriptInterp::getInteger long  value,
unsigned  prec
[static]
 

long ScriptInterp::getIntValue const char *  text,
unsigned  prec,
Property *  property = NULL
 

char* ScriptInterp::getKeyword const char *  keyword  ) 
 

Fetch an embedded attribute keyword argument.

This allows embedded tag=value keywords to be extracted.

Returns:
option or NULL if not found.
Parameters:
keyword to find.

Symbol* ScriptInterp::getLocal const char *  name,
unsigned  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.

Returns:
symbol found.
Parameters:
script symbol to look for or create.
size of symbol to allocate.

unsigned long ScriptInterp::getMask void   )  [protected]
 

Fetch the current interpreter mask bits directly.

Returns:
interpreter mask.

const char* ScriptInterp::getMember void   ) 
 

Return the member id of a script command.

Returns:
member id or NULL if none.

Name* ScriptInterp::getObject void   )  [inline]
 

Return the master script object for resource context.

Returns:
script object being executed.

bool ScriptInterp::getOnce void   )  [protected]
 

Fetch unique "once" flag and set.

Returns:
true if once.

Reimplemented in Trunk.

char* ScriptInterp::getOption const char *  def = NULL  ) 
 

Fetch next logical option but do not evaluate.

The index is advanced.

Returns:
option or NULL if end of list.
Parameters:
optional default.

char ScriptInterp::getPackToken void   ) 
 

Get pack token.

virtual const char* ScriptInterp::getPrefixPath void   )  [inline, virtual]
 

Reimplemented in Trunk.

static long ScriptInterp::getRealValue double  val,
unsigned  prec
[static]
 

Line* ScriptInterp::getScript void   )  [inline]
 

Return the current script line object so it may be debugged.

Returns:
script image record being executed.

Name* ScriptInterp::getScriptCopy const char *  src  )  [protected]
 

Fetch duplicative script image as needed.

Returns:
script object.
Parameters:
label to dup.

Name* ScriptInterp::getScriptImage const char *  label  )  [protected]
 

Runtime branch point for label selection.

Returns:
script found.
Parameters:
label to locate.

unsigned long ScriptInterp::getScriptMask void   )  [protected]
 

Get script mask through subroutine levels.

Returns:
mask by sub level scan.

unsigned long ScriptInterp::getScriptMask const char *  id  )  [inline, protected]
 

Fetch the script mask identifer.

Returns:
script mask.

char* ScriptInterp::getString void   ) 
 

Fetch and concatenate a temporary string expression until either a comma or closing parenthesis.

Returns:
pointer to temp string buffer.

ScriptSymbol* ScriptInterp::getSymbols void   )  [inline]
 

Get local stack context symbol space.

char* ScriptInterp::getTempBuffer void   ) 
 

Fetch a temp workspace buffer.

Returns:
workspace pointer.

static long ScriptInterp::getTens unsigned  prec  )  [static]
 

char* ScriptInterp::getValue const char *  def = NULL  ) 
 

Fetch and evaluate next logical option.

If a symbol ref. then the symbol is also expressed. The index is advanced.

Returns:
option value or NULL if end of list.
Parameters:
optional default value.

const char* ScriptInterp::getVariable const char *  id  ) 
 

Accesses local or global variable by direct name reference.

Returns:
content
Parameters:
symbol name.

bool ScriptInterp::hasEvents void   )  [inline]
 

Return if the script has generic event handlers.

..

Returns:
true if generic handlers.

bool ScriptInterp::ifGoto void   )  [protected]
 

If version of goto.

virtual void ScriptInterp::initialize void   )  [inline, protected, virtual]
 

New virtual to initialize script environment syms before running init sections.

Reimplemented in Trunk.

unsigned ScriptInterp::initKeywords unsigned  size  ) 
 

Initialize symbols from the keyword list.

void ScriptInterp::initRuntime Name *  name  )  [protected]
 

Initialize execution environment for a script.

Symbol* ScriptInterp::initVariable unsigned  size = 0  ) 
 

Fetch a variable (symbol) that will be used to store data.

This advances the index.

Returns:
symbol found if any.
Parameters:
optional size to allocate if new symbol.

bool ScriptInterp::intGoto bool  event = false  )  [protected]
 

This is a new internal goto handler.

Parameters:
flag if we should post evtGoto if a true script branch occurs.

bool ScriptInterp::isActive void   )  [inline]
 

Test if script interpreter is currently active.

Returns:
true if active.

void ScriptInterp::missing const char *  sym  ) 
 

Post missing variable message on warn.

Parameters:
variable name that is missing.

void ScriptInterp::Notify const char *  str  )  [inline, protected]
 

Notify signal by symbolic name.

Parameters:
mask name.

void ScriptInterp::Notify unsigned long  mask  )  [inline, protected]
 

Notify signal mask for "on" handlers.

Parameters:
mask value.

bool ScriptInterp::pull void   )  [protected]
 

Attempt to recall a previous stack level.

Returns:
false if stack underflow.

bool ScriptInterp::push void   )  [protected]
 

Attempt to push a value onto the stack.

Returns:
false if stack overflow.

bool ScriptInterp::redirect const char *  scrname  ) 
 

Script redirection support.

Returns:
false if redirect failed.
Parameters:
name of script entry.

void ScriptInterp::rewindTemp void   ) 
 

Rewind temporary buffer for prescan results.

bool ScriptInterp::scrAlias void   )  [protected]
 

bool ScriptInterp::scrArm void   )  [protected]
 

bool ScriptInterp::scrArray void   )  [protected]
 

bool ScriptInterp::scrBasename void   )  [protected]
 

bool ScriptInterp::scrBegin void   )  [protected]
 

bool ScriptInterp::scrBreak void   )  [protected]
 

bool ScriptInterp::scrCache void   )  [protected]
 

bool ScriptInterp::scrCall void   )  [protected]
 

bool ScriptInterp::scrCase void   )  [protected]
 

bool ScriptInterp::scrClear void   )  [protected]
 

bool ScriptInterp::scrConst void   )  [protected]
 

bool ScriptInterp::scrContinue void   )  [protected]
 

bool ScriptInterp::scrCounter void   )  [protected]
 

bool ScriptInterp::scrData void   )  [protected]
 

Method used to encode "data" lines.

bool ScriptInterp::scrDec void   )  [protected]
 

bool ScriptInterp::scrDecimal void   )  [protected]
 

bool ScriptInterp::scrDirname void   )  [protected]
 

bool ScriptInterp::scrDisable void   )  [protected]
 

bool ScriptInterp::scrDisarm void   )  [protected]
 

bool ScriptInterp::scrDo void   )  [protected]
 

bool ScriptInterp::scrDump void   )  [protected]
 

bool ScriptInterp::scrDup void   )  [protected]
 

bool ScriptInterp::scrElse void   )  [protected]
 

bool ScriptInterp::scrEnable void   )  [protected]
 

bool ScriptInterp::scrEnd void   )  [protected]
 

bool ScriptInterp::scrEndcase void   )  [protected]
 

bool ScriptInterp::scrEndif void   )  [protected]
 

bool ScriptInterp::scrError void   )  [protected]
 

bool ScriptInterp::scrExit void   )  [protected]
 

Some systems can derive alternative "exit" commands which can call this routine after performing other operations.

bool ScriptInterp::scrFifo void   )  [protected]
 

bool ScriptInterp::scrFor void   )  [protected]
 

bool ScriptInterp::scrForarray void   )  [protected]
 

bool ScriptInterp::scrFordata void   )  [protected]
 

bool ScriptInterp::scrFordatasource void   )  [protected]
 

bool ScriptInterp::scrForeach void   )  [protected]
 

bool ScriptInterp::scrFullpath void   )  [protected]
 

bool ScriptInterp::scrGather void   )  [protected]
 

bool ScriptInterp::scrGoto void   )  [protected]
 

This is often called to process branching requests.

bool ScriptInterp::scrHas void   )  [protected]
 

bool ScriptInterp::scrIf void   )  [protected]
 

override if support.

bool ScriptInterp::scrIfThen void   )  [protected]
 

bool ScriptInterp::scrInc void   )  [protected]
 

bool ScriptInterp::scrIndex void   )  [protected]
 

bool ScriptInterp::scrInit void   )  [protected]
 

bool ScriptInterp::scrLabel void   )  [protected]
 

bool ScriptInterp::scrLoadable void   )  [protected]
 

bool ScriptInterp::scrLocal void   )  [protected]
 

bool ScriptInterp::scrLock void   )  [protected]
 

bool ScriptInterp::scrLoop void   )  [protected]
 

bool ScriptInterp::scrMap void   )  [protected]
 

bool ScriptInterp::scrMax void   )  [protected]
 

bool ScriptInterp::scrMin void   )  [protected]
 

bool ScriptInterp::scrMissing void   )  [protected]
 

bool ScriptInterp::scrNumber void   )  [protected]
 

bool ScriptInterp::scrOn void   )  [protected]
 

bool ScriptInterp::scrOnce void   )  [protected]
 

bool ScriptInterp::scrPack void   )  [protected]
 

bool ScriptInterp::scrPop void   )  [protected]
 

bool ScriptInterp::scrPost void   )  [protected]
 

bool ScriptInterp::scrPostList void   )  [protected]
 

bool ScriptInterp::scrRaise void   )  [protected]
 

This is used to raise a named event branch.

bool ScriptInterp::scrRead void   )  [protected]
 

bool ScriptInterp::scrRef void   )  [protected]
 

bool ScriptInterp::scrRemove void   )  [protected]
 

bool ScriptInterp::scrRepeat void   )  [protected]
 

bool ScriptInterp::scrReset void   )  [protected]
 

bool ScriptInterp::scrRestart void   )  [protected]
 

bool ScriptInterp::scrReturn void   )  [protected]
 

bool ScriptInterp::scrSelect void   )  [protected]
 

bool ScriptInterp::scrSequence void   )  [protected]
 

bool ScriptInterp::scrSet void   )  [protected]
 

bool ScriptInterp::scrSize void   )  [protected]
 

bool ScriptInterp::scrSkip void   )  [protected]
 

bool ScriptInterp::scrSlog void   )  [protected]
 

bool ScriptInterp::scrStack void   )  [protected]
 

bool ScriptInterp::scrStruct void   )  [protected]
 

bool ScriptInterp::scrSwap void   )  [protected]
 

bool ScriptInterp::scrThen void   )  [protected]
 

bool ScriptInterp::scrTry void   )  [protected]
 

bool ScriptInterp::scrTryeach void   )  [protected]
 

bool ScriptInterp::scrUnpack void   )  [protected]
 

bool ScriptInterp::scrUse void   )  [protected]
 

bool ScriptInterp::scrVar void   )  [protected]
 

void ScriptInterp::setCommand ScriptCommand sc  )  [inline, protected]
 

bool ScriptInterp::setData const char *  scrname  ) 
 

Set data read pointer to a known data source script.

Parameters:
name of script.
Returns:
true on success.

virtual void ScriptInterp::setExclusive bool  enable  )  [inline, protected, virtual]
 

Set exclusive sync locking for interpreter.

Parameters:
turn exclusive on or off.

Reimplemented from ScriptSymbol.

Reimplemented in Trunk.

void ScriptInterp::setLine Line line  )  [protected]
 

Set the line handler to a new statement.

Parameters:
line value.

void ScriptInterp::setLocal void   ) 
 

Set a new local context.

If the old context is only used on our stack level already, it is destroyed.

void ScriptInterp::setTemp const char *  value  ) 
 

Set prescan value into temporary buffer.

Parameters:
value to set into temp.

bool ScriptInterp::setVariable const char *  id,
unsigned  size,
const char *  value = NULL
 

Provides interface for setting local or global variable passed by reference to drivers and such.

Returns:
true if successful
Parameters:
symbol name.
symbol size to allocate if new.
symbol value.

bool ScriptInterp::signal unsigned  trapid  )  [protected]
 

Signals can be referenced by numeric id as well as by symbolic name.

Returns:
true if signal handler is not blocked.
Parameters:
trap number of handler.

bool ScriptInterp::signal const char *  trapname  )  [protected]
 

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.

Returns:
true if signal handler is not blocked.
Parameters:
name of signal identifier.

virtual void ScriptInterp::sleepScheduler timeout_t  timeout  )  [inline, protected, virtual]
 

Patch point for sleep delay notification.

Parameters:
sleep timeout expected.

bool ScriptInterp::step void   ) 
 

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.

Returns:
true if advanced to next script statement already.

virtual void ScriptInterp::stepScheduler const char *  trapname  )  [inline, protected, virtual]
 

Step scheduler callback to force step execution.

Parameters:
trap name to use.

virtual void ScriptInterp::stop unsigned long  mask  )  [inline, protected, virtual]
 

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.

Parameters:
signal mask forcing stop.

void ScriptInterp::trap const char *  trapname  )  [protected]
 

Select trap by symbolic name and execute if found, else advance to next script step (unless exit trap).

Parameters:
name of trap to select.

void ScriptInterp::trap unsigned  id  )  [protected]
 

Set the execution interpreter to a trap identifier.

If no trap id exists, then advance to next script statement (unless exit trap).

Parameters:
id of trap to select numerically.

void ScriptInterp::warning bool  enable  )  [inline]
 

Enable warnings on parsing undefined symbols.

Parameters:
true to enable undefined warning.


Friends And Related Function Documentation

friend class __EXPORT ScriptCommand [friend]
 

friend class __EXPORT ScriptData [friend]
 

friend class __EXPORT ScriptImage [friend]
 

friend class __EXPORT ScriptModule [friend]
 


Member Data Documentation

char ScriptInterp::_idname[33] [protected]
 

Reimplemented from ScriptSymbol.

ScriptCommand* ScriptInterp::cmd [protected]
 

ScriptData* ScriptInterp::datasource [protected]
 

ScriptImage* ScriptInterp::image [protected]
 

bool ScriptInterp::initialized [protected]
 

unsigned char ScriptInterp::lckcount [protected]
 

bool ScriptInterp::once [protected]
 

Reimplemented in Trunk.

size_t ScriptInterp::pgsize [protected]
 

ScriptSymbol* ScriptInterp::recmode [protected]
 

Context ScriptInterp::script[31+1] [protected]
 

Reimplemented in Trunk, and Trunk.

unsigned long ScriptInterp::signalmask [protected]
 

unsigned ScriptInterp::stack [protected]
 

unsigned ScriptInterp::steps [protected]
 

unsigned ScriptInterp::symsize [protected]
 

Reimplemented from ScriptSymbol.

int ScriptInterp::tempidx [protected]
 

char* ScriptInterp::temps[16] [protected]
 

bool ScriptInterp::trace [protected]
 

bool ScriptInterp::warn [protected]
 


The documentation for this class was generated from the following file:
Generated on Tue Sep 13 02:19:10 2005 for Bayonne by  doxygen 1.4.4