Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ScriptImage Class Reference

A derivable class to hold compiled script images for active processes. Script compiler image set. More...

#include <script.h>

Inheritance diagram for ScriptImage:

MemPager List of all members.

Protected Methods

 ScriptImage (ScriptCommand *cmdset)
 Construct a new working image. More...

scriptname_tInclude (const char *scrfile)
 A method to invoke the script compiler to include a script only if it has not been included already. More...

int Compile (const char *scrfile)
 The script compiler itself. More...

int Compile (const char *scrfile, char *name)
 Compile a script from disk and give it a different internal "name" as passed. More...

void Commit (void)
 Used in the derived constructor to "commit" the current image for new processes. More...

virtual scriptname_tgetScript (const char *name)
 Fetch named script. More...


Friends

class  ScriptInterp

Detailed Description

A derivable class to hold compiled script images for active processes. Script compiler image set.

This includes the script image compiler itself. Typically, a script is compiled one file at a time from a directory, and the committed, during the constructor in a derived class.

Author(s):
David Sugar <dyfet@ostel.com>.


Constructor & Destructor Documentation

ScriptImage::ScriptImage ( ScriptCommand * cmdset ) [protected]
 

Construct a new working image.

This must be derived to an application specific compiler that can scan directories and invoke the compiler as needed.

Parameters:
cmdset   of keyword table object used.


Member Function Documentation

void ScriptImage::Commit ( void ) [protected]
 

Used in the derived constructor to "commit" the current image for new processes.

This is usually the last statement in the derived constructor.

int ScriptImage::Compile ( const char * scrfile,
char * name ) [protected]
 

Compile a script from disk and give it a different internal "name" as passed.

Returns:
lines of script compiled.
Parameters:
name   of script file to compile.
name   of script to save under.
test   if script already loaded.

int ScriptImage::Compile ( const char * scrfile ) [protected]
 

The script compiler itself.

This linearly compiles a Bayonne script file that is specified. Normally used along with a dir scanner in the constructor.

Returns:
lines of script compiled.
Parameters:
name   of script file to compile.

scriptname_t * ScriptImage::Include ( const char * scrfile ) [protected]
 

A method to invoke the script compiler to include a script only if it has not been included already.

Returns:
named script object.
Parameters:
name   of script file to compile.

scriptname_t * ScriptImage::getScript ( const char * name ) [protected, virtual]
 

Fetch named script.

Made virtual so that it could have a a overriden version which externally fetches scripts not already compiled, for example.

Parameters:
script   name to find.
Returns:
script or NULL.


Friends And Related Function Documentation

class ScriptInterp [friend]
 


The documentation for this class was generated from the following file:
Generated at Fri Dec 15 09:10:19 2000 for CommonC++ by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000