Bayonne2 / Common C++ 2 Framework
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends
ost::ScriptCompiler Class Reference

A derivable class to hold compiled script images for active processes. More...

#include <script3.h>

Inheritance diagram for ost::ScriptCompiler:
Inheritance graph
[legend]
Collaboration diagram for ost::ScriptCompiler:
Collaboration graph
[legend]

Data Structures

struct  _merge
 

Public Types

enum  scrAccess {
  scrPUBLIC, scrPROTECTED, scrPRIVATE, scrFUNCTION,
  scrLOCAL
}
 
typedef enum scrAccess scrAccess
 
enum  symType {
  symNORMAL = 0, symCONST, symDYNAMIC, symFIFO,
  symSEQUENCE, symSTACK, symCOUNTER, symPOINTER,
  symREF, symARRAY, symASSOC, symINITIAL,
  symNUMBER, symLOCK, symPROPERTY, symORIGINAL,
  symMODIFIED, symTIMER, symBOOL
}
 
typedef enum symType symType
 
typedef bool(ScriptInterp::* Method )(void)
 
typedef const char
*(ScriptCommand::* 
Check )(Line *line, ScriptImage *img)
 
typedef bool(* Cond )(ScriptInterp *interp, const char *v)
 
typedef long(* Function )(long *args, unsigned prec)
 
typedef const char *(* Meta )(ScriptInterp *interp, const char *token)
 
typedef const char *(* Parse )(ScriptCompiler *img, const char *token)
 
typedef void(* Init )(void)
 
typedef struct ost::Script::_symbol Symbol
 
typedef struct ost::Script::_array Array
 

Public Member Functions

char * getToken (char **pre=NULL)
 
virtual void fastBranch (ScriptInterp *interp)
 Fast branch linkback code. More...
 
 ScriptCompiler (ScriptCommand *cmdset, const char *symset)
 Construct a new working image. More...
 
Nameinclude (const char *name)
 A method to invoke the script compiler to include a script only if it has not been included already. More...
 
int compile (const char *file)
 The script compiler itself. More...
 
int compile (const char *file, char *name)
 Compile a script from disk and give it a different internal "name" as passed. More...
 
int compileDefinitions (const char *file)
 Compile a defintions library, commonly used for remapping tokens to macros. More...
 
int compile (std::istream *stream, char *name, const char *file=NULL)
 Compile an open stream object into a script. More...
 
void commit (void)
 Used in the derived constructor to "commit" the current image for new processes. More...
 
virtual const char * getDefined (const char *token)
 Used to process '$const' inserts. More...
 
const char * preproc (const char *token)
 Check for special preprocessor token. More...
 
std::istream * getSource (void)
 Used by embedded interpreters to fetch script from the current source file. More...
 
void * getMemory (size_t size)
 Get memory for assoc data... More...
 
const char * dupString (const char *str)
 Duplicate string... More...
 
NamegetCurrent (void)
 Get current entity being compiled... More...
 
void addSelect (Line *line)
 Add a select record to the currently compiled script. More...
 
void addRegistration (Line *line)
 Add a registration record to the compiled script. More...
 
ScriptRegistrygetRegistry (void)
 Get a registration record to use. More...
 
void addRoute (Line *line, unsigned pri)
 Add an advertised route in a priority slot. More...
 
LinegetSelect (void)
 Get the selection list from the image. More...
 
LinegetRegistration (void)
 Get the registration list from the image. More...
 
LinegetRoute (unsigned pri)
 Get an advertised priority record from the image. More...
 
unsigned long getInstance (void)
 Get the session instance of the image. More...
 
void purge (void)
 Purge and reload the script image workspace. More...
 
void load (Initial *ilist)
 Used by a derived constructor to load an initialization list. More...
 
void load (const char *keypath)
 Load additional key values into the currrent object from the specfied config source (a config file/section pair). More...
 
void load (Define *pairs)
 Load default keywords into the current object. More...
 
void initial (const char *keyword, const char *value, unsigned size=0)
 Used to load a single initialization list entry. More...
 
virtual NamegetScript (const char *name)
 Fetch named script. More...
 
ScriptCommandgetCommand (void)
 Get the command object associated with the image. More...
 
bool isRipple (void)
 Get the ripple flag for the current image. More...
 
unsigned gather (const char *suffix, Name **array, unsigned size)
 Fetch list of relational scripts. More...
 
void incRef (void)
 inc the reference count. More...
 
void decRef (void)
 dec the reference count. More...
 
bool isRef (void)
 See if the image is referenced... More...
 
ScriptImagegetActive (void)
 Get the active image from command. More...
 
unsigned getIndex (char **data, unsigned max)
 Get an index array of ALL keywords that are stored by the current keydata object. More...
 
void loadPrefix (const char *prefix, const char *keypath)
 Load additional key values into the currrent object from the specfied config source (a config file/section pair). More...
 
void loadFile (const char *filepath, const char *keys=NULL, const char *pre=NULL)
 Load additional keys into the current object using a real filename that is directly passed rather than a computed key path. More...
 
void unlink (void)
 Unlink the keydata object from the cache file stream. More...
 
int getCount (const char *sym)
 Get a count of the number of data "values" that is associated with a specific keyword. More...
 
unsigned getCount (void)
 Get the count of keyword indexes that are actually available so one can allocate a table to receive getIndex. More...
 
const char * getFirst (const char *sym)
 Get the first data value for a given keyword. More...
 
const char * getLast (const char *sym)
 Get the last (most recently set) value for a given keyword. More...
 
bool isKey (const char *sym)
 Find if a given key exists. More...
 
const char * getString (const char *sym, const char *def=NULL)
 Get a string value, with an optional default if missing. More...
 
long getLong (const char *sym, long def=0)
 Get a long value, with an optional default if missing. More...
 
bool getBool (const char *key)
 Get a bool value. More...
 
double getDouble (const char *key, double def=0.)
 Get a floating value. More...
 
void setValue (const char *sym, const char *data)
 Set (replace) the value of a given keyword. More...
 
const char *const * getList (const char *sym)
 Return a list of all values set for the given keyword returned in order. More...
 
void clrValue (const char *sym)
 Clear all values associated with a given keyword. More...
 
const char * operator[] (const char *keyword)
 A convient notation for accessing the keydata as an associative array of keyword/value pairs through the [] operator. More...
 
void * getPointer (const char *id) const
 
void setPointer (const char *id, void *data)
 

Static Public Member Functions

static bool commit (Symbol *sym, const char *value)
 
static unsigned count (Symbol *sym)
 
static unsigned getIndex (const char *id)
 
static void end (void)
 static member to end keydata i/o allocations. More...
 
static bool isScript (Name *scr)
 
static bool isSymbol (const char *id)
 
static bool use (const char *name)
 
static Symbolderef (Symbol *sym)
 
static bool append (Symbol *sym, const char *value)
 
static bool symindex (Symbol *sym, short offset)
 
static const char * extract (Symbol *sym)
 
static unsigned storage (Symbol *sym)
 
static void clear (Symbol *sym)
 
static void addFunction (const char *name, unsigned count, Function i)
 
static void addConditional (const char *name, Cond test)
 
static bool isPrivate (Name *scr)
 
static bool isFunction (Name *scr)
 

Data Fields

class __EXPORT Line
 
class __EXPORT Name
 

Static Public Attributes

static size_t pagesize
 
static bool fastStart
 
static bool useBigmem
 
static unsigned fastStepping
 
static unsigned autoStepping
 
static unsigned symsize
 
static unsigned symlimit
 
static char decimal
 
static bool use_definitions
 
static bool use_macros
 
static bool use_prefix
 
static bool use_merge
 
static bool use_funcs
 
static const char * plugins
 
static const char * altplugins
 
static const char * access_user
 
static const char * access_pass
 
static const char * access_host
 
static bool exec_funcs
 
static const char * exec_extensions
 
static const char * exec_token
 
static const char * exec_prefix
 
static const char * exit_token
 
static const char * apps_extensions
 
static const char * apps_prefix
 
static const char * etc_prefix
 
static const char * var_prefix
 
static const char * log_prefix
 

Protected Types

typedef struct
ost::ScriptCompiler::_merge 
merge_t
 

Protected Member Functions

virtual bool checkSegment (Name *scr)
 
Method getHandler (const char *keyword)
 Get the interpreter method pointer for a given keyword. More...
 
KeysymgetSymbol (const char *sym, bool create)
 
virtual void * first (size_t size)
 Allocate first workspace from paged memory. More...
 
char * first (char *str)
 Allocate a string from the memory pager pool and copy the string into it's new memory area. More...
 
virtual void * alloc (size_t size)
 Allocate memory from either the currently active page, or allocate a new page for the object. More...
 
char * alloc (const char *str)
 Allocate a string from the memory pager pool and copy the string inti it's new memory area. More...
 
void clean (void)
 Clean for memory cleanup before exiting. More...
 
int getPages (void)
 Return the total number of pages that have been allocated for this memory pool. More...
 
void clear (void)
 

Protected Attributes

std::ifstream scrSource
 
std::istream * scrStream
 
char * buffer
 
unsigned bufsize
 
char * bp
 
bool quote
 
unsigned paren
 
unsigned inccount
 
const char * incfiles [256]
 
merge_tmlist
 
ScriptCommandcmds
 
unsigned refcount
 
Nameindex [KEYDATA_INDEX_SIZE+1]
 
Namecurrent
 
Lineselect
 
Lineselecting
 
Lineregistration
 
Lineadvertising [16]
 
Mutex duplock
 
ScriptObjectobjects
 
unsigned long instance
 
ost::ScriptImage::InitialListilist
 

Static Protected Attributes

static unsigned long serial
 
static Testtest
 
static Funifun
 

Friends

class __EXPORT ScriptInterp
 

Detailed Description

A derivable class to hold compiled script images for active processes.

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
David Sugar dyfet.nosp@m.@ost.nosp@m.el.co.nosp@m.m. Script compiler image set.

Definition at line 1150 of file script3.h.

Member Typedef Documentation

typedef struct ost::Script::_array ost::Script::Array
inherited
typedef const char*(ScriptCommand::* ost::Script::Check)(Line *line, ScriptImage *img)
inherited

Definition at line 106 of file script3.h.

typedef bool(* ost::Script::Cond)(ScriptInterp *interp, const char *v)
inherited

Definition at line 107 of file script3.h.

typedef long(* ost::Script::Function)(long *args, unsigned prec)
inherited

Definition at line 108 of file script3.h.

typedef void(* ost::Script::Init)(void)
inherited

Definition at line 111 of file script3.h.

typedef const char*(* ost::Script::Meta)(ScriptInterp *interp, const char *token)
inherited

Definition at line 109 of file script3.h.

typedef bool(ScriptInterp::* ost::Script::Method)(void)
inherited

Definition at line 105 of file script3.h.

typedef const char*(* ost::Script::Parse)(ScriptCompiler *img, const char *token)
inherited

Definition at line 110 of file script3.h.

typedef enum scrAccess ost::Script::scrAccess
inherited

Definition at line 121 of file script3.h.

typedef struct ost::Script::_symbol ost::Script::Symbol
inherited
typedef enum symType ost::Script::symType
inherited

Definition at line 145 of file script3.h.

Member Enumeration Documentation

enum ost::Script::scrAccess
inherited
Enumerator
scrPUBLIC 
scrPROTECTED 
scrPRIVATE 
scrFUNCTION 
scrLOCAL 

Definition at line 113 of file script3.h.

enum ost::Script::symType
inherited
Enumerator
symNORMAL 
symCONST 
symDYNAMIC 
symFIFO 
symSEQUENCE 
symSTACK 
symCOUNTER 
symPOINTER 
symREF 
symARRAY 
symASSOC 
symINITIAL 
symNUMBER 
symLOCK 
symPROPERTY 
symORIGINAL 
symMODIFIED 
symTIMER 
symBOOL 

Definition at line 123 of file script3.h.

Constructor & Destructor Documentation

ost::ScriptCompiler::ScriptCompiler ( ScriptCommand cmdset,
const char *  symset 
)

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
cmdsetof keyword table object used.
symsetof symbols to set.

Member Function Documentation

static void ost::Script::addConditional ( const char *  name,
Cond  test 
)
staticinherited
static void ost::Script::addFunction ( const char *  name,
unsigned  count,
Function  i 
)
staticinherited
void ost::ScriptImage::addRegistration ( Line line)
inherited

Add a registration record to the compiled script.

Parameters
linestatement to add to list.
void ost::ScriptImage::addRoute ( Line line,
unsigned  pri 
)
inherited

Add an advertised route in a priority slot.

Parameters
linestatement to add to list.
priof route to add to.
void ost::ScriptImage::addSelect ( Line line)
inherited

Add a select record to the currently compiled script.

Parameters
linestatement to add to list.
virtual void* MemPager::alloc ( size_t  size)
protectedvirtualinherited

Allocate memory from either the currently active page, or allocate a new page for the object.

Parameters
sizesize of memory to allocate.
Returns
pointer to allocated memory.

Reimplemented in SharedMemPager.

char* MemPager::alloc ( const char *  str)
protectedinherited

Allocate a string from the memory pager pool and copy the string inti it's new memory area.

This checks only the last active page for available space before allocating a new page.

Parameters
strstring to allocate and copy into paged memory pool.
Returns
copy of string from allocated memory.
static bool ost::Script::append ( Symbol sym,
const char *  value 
)
staticinherited
virtual bool ost::ScriptCompiler::checkSegment ( Name scr)
protectedvirtual
void MemPager::clean ( void  )
protectedinherited

Clean for memory cleanup before exiting.

static void ost::Script::clear ( Symbol sym)
staticinherited
void Assoc::clear ( void  )
protectedinherited
void Keydata::clrValue ( const char *  sym)
inherited

Clear all values associated with a given keyword.

This does not de-allocate the keyword from memory, however.

Returns
keyword name to clear.
static bool ost::Script::commit ( Symbol sym,
const char *  value 
)
staticinherited
void ost::ScriptCompiler::commit ( void  )

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

This is usually the last statement in the derived constructor.

int ost::ScriptCompiler::compile ( const char *  file)

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
filename of script file to compile.
int ost::ScriptCompiler::compile ( const char *  file,
char *  name 
)

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

Returns
lines of script compiled.
Parameters
filename of script file to compile.
nameof script to compile under.
int ost::ScriptCompiler::compile ( std::istream *  stream,
char *  name,
const char *  file = NULL 
)

Compile an open stream object into a script.

Returns
lines of script compiled.
Parameters
streamobject to use.
nameof script save under.
filename to use in object.
int ost::ScriptCompiler::compileDefinitions ( const char *  file)

Compile a defintions library, commonly used for remapping tokens to macros.

Returns
lines of script compiled.
Parameters
filename of defintions file to compile.
static unsigned ost::Script::count ( Symbol sym)
staticinherited
void ost::ScriptImage::decRef ( void  )
inlineinherited

dec the reference count.

Definition at line 1121 of file script3.h.

static Symbol* ost::Script::deref ( Symbol sym)
staticinherited
const char* ost::ScriptImage::dupString ( const char *  str)
inherited

Duplicate string...

Returns
memory pointer.
Parameters
stringrequested.
static void Keydata::end ( void  )
staticinherited

static member to end keydata i/o allocations.

static const char* ost::Script::extract ( Symbol sym)
staticinherited
virtual void ost::ScriptCompiler::fastBranch ( ScriptInterp interp)
virtual

Fast branch linkback code.

Reimplemented from ost::ScriptImage.

virtual void* MemPager::first ( size_t  size)
protectedvirtualinherited

Allocate first workspace from paged memory.

This method scans all currently allocated blocks for available space before adding new pages and hence is both slower and more efficient.

Parameters
sizesize of memory to allocate.
Returns
pointer to allocated memory.

Reimplemented in SharedMemPager.

char* MemPager::first ( char *  str)
protectedinherited

Allocate a string from the memory pager pool and copy the string into it's new memory area.

This method allocates memory by first searching for an available page, and then allocating a new page if no space is found.

Parameters
strstring to allocate and copy into paged memory pool.
Returns
copy of string from allocated memory.
unsigned ost::ScriptImage::gather ( const char *  suffix,
Name **  array,
unsigned  size 
)
inherited

Fetch list of relational scripts.

Parameters
suffixextension of scripts being fetched.
arrayof script objects gathered from image.
sizelimit of array to gather.
Returns
count of entries found.
ScriptImage* ost::ScriptImage::getActive ( void  )
inlineinherited

Get the active image from command.

Useful when compiling.

Returns
ScriptImage of currently active image.

Definition at line 1137 of file script3.h.

bool Keydata::getBool ( const char *  key)
inherited

Get a bool value.

Parameters
symkeyword name.
Returns
true or false.
ScriptCommand* ost::ScriptImage::getCommand ( void  )
inlineinherited

Get the command object associated with the image.

Returns
command object.

Definition at line 1091 of file script3.h.

int Keydata::getCount ( const char *  sym)
inherited

Get a count of the number of data "values" that is associated with a specific keyword.

Each value is from an accumulation of "<code>load()</code>" requests.

Parameters
symkeyword symbol name.
Returns
count of values associated with keyword.
unsigned Keydata::getCount ( void  )
inherited

Get the count of keyword indexes that are actually available so one can allocate a table to receive getIndex.

Returns
number of keywords found.
Name* ost::ScriptImage::getCurrent ( void  )
inlineinherited

Get current entity being compiled...

Returns
pointer to script currently compiling.

Definition at line 973 of file script3.h.

virtual const char* ost::ScriptCompiler::getDefined ( const char *  token)
virtual

Used to process '$const' inserts.

Returns
string if found.
Parameters
tokenstring being substituted.
double Keydata::getDouble ( const char *  key,
double  def = 0. 
)
inherited

Get a floating value.

Parameters
symkeyword name.
defaultif not set.
Returns
value of key.
const char* Keydata::getFirst ( const char *  sym)
inherited

Get the first data value for a given keyword.

This will typically be the /etc set global default.

Parameters
symkeyword symbol name.
Returns
first set value for this symbol.
Method ost::ScriptImage::getHandler ( const char *  keyword)
inlineprotectedinherited

Get the interpreter method pointer for a given keyword.

Returns
method handler.
Parameters
keywordto search.

Definition at line 943 of file script3.h.

static unsigned ost::Script::getIndex ( const char *  id)
staticinherited
unsigned Keydata::getIndex ( char **  data,
unsigned  max 
)
inherited

Get an index array of ALL keywords that are stored by the current keydata object.

Returns
number of keywords found.
Parameters
datapointer of array to hold keyword strings.
maxnumber of entries the array can hold.
unsigned long ost::ScriptImage::getInstance ( void  )
inlineinherited

Get the session instance of the image.

Definition at line 1032 of file script3.h.

const char* Keydata::getLast ( const char *  sym)
inherited

Get the last (most recently set) value for a given keyword.

This is typically the value actually used.

Parameters
symkeyword symbol name.
Returns
last set value for this symbol.
const char* const* Keydata::getList ( const char *  sym)
inherited

Return a list of all values set for the given keyword returned in order.

Returns
list pointer of array holding all keyword values.
Parameters
symkeyword name to fetch.
long Keydata::getLong ( const char *  sym,
long  def = 0 
)
inherited

Get a long value, with an optional default if missing.

Parameters
symkeyword name.
defaultif not present.
Returns
long value of key.
void* ost::ScriptImage::getMemory ( size_t  size)
virtualinherited

Get memory for assoc data...

Returns
memory pointer.
Parameters
sizeof memory request.

Implements Assoc.

int MemPager::getPages ( void  )
inlineinherited

Return the total number of pages that have been allocated for this memory pool.

Returns
number of pages allocated.

Definition at line 181 of file misc.h.

void* Assoc::getPointer ( const char *  id) const
inherited
Line* ost::ScriptImage::getRegistration ( void  )
inlineinherited

Get the registration list from the image.

Returns
registration list.

Definition at line 1018 of file script3.h.

ScriptRegistry* ost::ScriptImage::getRegistry ( void  )
inherited

Get a registration record to use.

Returns
registration object.
Line* ost::ScriptImage::getRoute ( unsigned  pri)
inlineinherited

Get an advertised priority record from the image.

Returns
priority list.

Definition at line 1026 of file script3.h.

virtual Name* ost::ScriptImage::getScript ( const char *  name)
virtualinherited

Fetch named script.

Parameters
nameof script to find.
Returns
script or NULL.
Line* ost::ScriptImage::getSelect ( void  )
inlineinherited

Get the selection list from the image.

Returns
selection list.

Definition at line 1010 of file script3.h.

std::istream* ost::ScriptCompiler::getSource ( void  )
inline

Used by embedded interpreters to fetch script from the current source file.

Returns
reference to source file stream.

Definition at line 1271 of file script3.h.

const char* Keydata::getString ( const char *  sym,
const char *  def = NULL 
)
inherited

Get a string value, with an optional default if missing.

Parameters
symkeyword name.
defaultif not present.
Returns
string value of key.
Keysym* Keydata::getSymbol ( const char *  sym,
bool  create 
)
protectedinherited
char* ost::ScriptCompiler::getToken ( char **  pre = NULL)
Name* ost::ScriptCompiler::include ( const char *  name)

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

Returns
named script object.
Parameters
nameof script file to compile.
void ost::ScriptImage::incRef ( void  )
inlineinherited

inc the reference count.

Definition at line 1115 of file script3.h.

void ost::ScriptImage::initial ( const char *  keyword,
const char *  value,
unsigned  size = 0 
)
inherited

Used to load a single initialization list entry.

Parameters
keywordname to initialize.
valueof keyword.
sizeof keyword data field.
static bool ost::Script::isFunction ( Name scr)
staticinherited
bool Keydata::isKey ( const char *  sym)
inherited

Find if a given key exists.

Parameters
symkeyword to find.
Returns
true if exists.
static bool ost::Script::isPrivate ( Name scr)
staticinherited
bool ost::ScriptImage::isRef ( void  )
inlineinherited

See if the image is referenced...

Returns
true if is referenced.

Definition at line 1129 of file script3.h.

bool ost::ScriptImage::isRipple ( void  )
inlineinherited

Get the ripple flag for the current image.

Returns
true if a ripple image.

Definition at line 1099 of file script3.h.

static bool ost::Script::isScript ( Name scr)
staticinherited
static bool ost::Script::isSymbol ( const char *  id)
staticinherited
void Keydata::load ( const char *  keypath)
inherited

Load additional key values into the currrent object from the specfied config source (a config file/section pair).

These values will overlay the current keywords when matches are found. This can be used typically in a derived config object class constructor to first load a /etc section, and then load a matching user specific entry from ~/. to override default system values with user specific keyword values.

Parameters
keypath(filepath/section)
void Keydata::load ( Define pairs)
inherited

Load default keywords into the current object.

This only loads keyword entries which have not already been defined to reduce memory usage. This form of Load is also commonly used in the constructor of a derived Keydata class.

Parameters
pairslist of NULL terminated default keyword/value pairs.
void ost::ScriptImage::load ( Initial ilist)
inherited

Used by a derived constructor to load an initialization list.

Parameters
ilistinitialization list of symbol pairs to load.
void Keydata::loadFile ( const char *  filepath,
const char *  keys = NULL,
const char *  pre = NULL 
)
inherited

Load additional keys into the current object using a real filename that is directly passed rather than a computed key path.

This also uses a [keys] section as passed to the object.

Parameters
filepathto load from
keyssection to parse from, or NULL to parse from head
preoptional key prefix
void Keydata::loadPrefix ( const char *  prefix,
const char *  keypath 
)
inherited

Load additional key values into the currrent object from the specfied config source (a config file/section pair).

These values will overlay the current keywords when matches are found. This can be used typically in a derived config object class constructor to first load a /etc section, and then load a matching user specific entry from ~/. to override default system values with user specific keyword values. This varient puts a prefix in front of the key name.

Parameters
prefix
keypath(filepath/section)
const char* Keydata::operator[] ( const char *  keyword)
inlineinherited

A convient notation for accessing the keydata as an associative array of keyword/value pairs through the [] operator.

Definition at line 611 of file misc.h.

const char* ost::ScriptCompiler::preproc ( const char *  token)

Check for special preprocessor token.

Returns
error message or NULL if no error.
Parameters
tokenname of keyword to check.
void ost::ScriptImage::purge ( void  )
inherited

Purge and reload the script image workspace.

void Assoc::setPointer ( const char *  id,
void *  data 
)
inherited
void Keydata::setValue ( const char *  sym,
const char *  data 
)
inherited

Set (replace) the value of a given keyword.

This new value will become the value returned from getLast(), while the prior value will still be stored and found from getList().

Parameters
symkeyword name to set.
datastring to store for the keyword.
static unsigned ost::Script::storage ( Symbol sym)
staticinherited
static bool ost::Script::symindex ( Symbol sym,
short  offset 
)
staticinherited
void Keydata::unlink ( void  )
inherited

Unlink the keydata object from the cache file stream.

This should be used if you plan to keepa Keydata object after it is loaded once all keydata objects have been loaded, otherwise the cfgFile stream will remain open. You can also use endKeydata().

static bool ost::Script::use ( const char *  name)
staticinherited

Friends And Related Function Documentation

friend class __EXPORT ScriptInterp
friend

Definition at line 1172 of file script3.h.

Field Documentation

const char* ost::Script::access_host
staticinherited

Definition at line 285 of file script3.h.

const char* ost::Script::access_pass
staticinherited

Definition at line 284 of file script3.h.

const char* ost::Script::access_user
staticinherited

Definition at line 283 of file script3.h.

Line* ost::ScriptImage::advertising[16]
protectedinherited

Definition at line 923 of file script3.h.

const char* ost::Script::altplugins
staticinherited

Definition at line 282 of file script3.h.

const char* ost::Script::apps_extensions
staticinherited

Definition at line 291 of file script3.h.

const char* ost::Script::apps_prefix
staticinherited

Definition at line 292 of file script3.h.

unsigned ost::Script::autoStepping
staticinherited

Definition at line 258 of file script3.h.

char* ost::ScriptCompiler::bp
protected

Definition at line 1157 of file script3.h.

char* ost::ScriptCompiler::buffer
protected

Definition at line 1155 of file script3.h.

unsigned ost::ScriptCompiler::bufsize
protected

Definition at line 1156 of file script3.h.

ScriptCommand* ost::ScriptImage::cmds
protectedinherited

Definition at line 919 of file script3.h.

Name * ost::ScriptImage::current
protectedinherited

Definition at line 921 of file script3.h.

char ost::Script::decimal
staticinherited

Definition at line 275 of file script3.h.

Mutex ost::ScriptImage::duplock
protectedinherited

Definition at line 924 of file script3.h.

const char* ost::Script::etc_prefix
staticinherited

Definition at line 294 of file script3.h.

const char* ost::Script::exec_extensions
staticinherited

Definition at line 287 of file script3.h.

bool ost::Script::exec_funcs
staticinherited

Definition at line 286 of file script3.h.

const char* ost::Script::exec_prefix
staticinherited

Definition at line 289 of file script3.h.

const char* ost::Script::exec_token
staticinherited

Definition at line 288 of file script3.h.

const char* ost::Script::exit_token
staticinherited

Definition at line 290 of file script3.h.

bool ost::Script::fastStart
staticinherited

Definition at line 255 of file script3.h.

unsigned ost::Script::fastStepping
staticinherited

Definition at line 257 of file script3.h.

Fun* ost::Script::ifun
staticprotectedinherited

Definition at line 306 of file script3.h.

ost::ScriptImage::InitialList * ost::ScriptImage::ilist
protectedinherited
unsigned ost::ScriptCompiler::inccount
protected

Definition at line 1160 of file script3.h.

const char* ost::ScriptCompiler::incfiles[256]
protected

Definition at line 1161 of file script3.h.

Name* ost::ScriptImage::index[KEYDATA_INDEX_SIZE+1]
protectedinherited

Definition at line 921 of file script3.h.

unsigned long ost::ScriptImage::instance
protectedinherited

Definition at line 927 of file script3.h.

class __EXPORT ost::Script::Line
inherited

Definition at line 102 of file script3.h.

const char* ost::Script::log_prefix
staticinherited

Definition at line 296 of file script3.h.

merge_t* ost::ScriptCompiler::mlist
protected

Definition at line 1170 of file script3.h.

class __EXPORT ost::Script::Name
inherited

Definition at line 103 of file script3.h.

ScriptObject* ost::ScriptImage::objects
protectedinherited

Definition at line 925 of file script3.h.

size_t ost::Script::pagesize
staticinherited

Definition at line 259 of file script3.h.

unsigned ost::ScriptCompiler::paren
protected

Definition at line 1159 of file script3.h.

const char* ost::Script::plugins
staticinherited

Definition at line 281 of file script3.h.

bool ost::ScriptCompiler::quote
protected

Definition at line 1158 of file script3.h.

unsigned ost::ScriptImage::refcount
protectedinherited

Definition at line 920 of file script3.h.

Line * ost::ScriptImage::registration
protectedinherited

Definition at line 922 of file script3.h.

std::ifstream ost::ScriptCompiler::scrSource
protected

Definition at line 1153 of file script3.h.

std::istream* ost::ScriptCompiler::scrStream
protected

Definition at line 1154 of file script3.h.

Line* ost::ScriptImage::select
protectedinherited

Definition at line 922 of file script3.h.

Line * ost::ScriptImage::selecting
protectedinherited

Definition at line 922 of file script3.h.

unsigned long ost::ScriptImage::serial
staticprotectedinherited

Definition at line 926 of file script3.h.

unsigned ost::Script::symlimit
staticinherited

Definition at line 261 of file script3.h.

unsigned ost::Script::symsize
staticinherited

Definition at line 260 of file script3.h.

Test* ost::Script::test
staticprotectedinherited

Definition at line 305 of file script3.h.

bool ost::Script::use_definitions
staticinherited

Definition at line 276 of file script3.h.

bool ost::Script::use_funcs
staticinherited

Definition at line 280 of file script3.h.

bool ost::Script::use_macros
staticinherited

Definition at line 277 of file script3.h.

bool ost::Script::use_merge
staticinherited

Definition at line 279 of file script3.h.

bool ost::Script::use_prefix
staticinherited

Definition at line 278 of file script3.h.

bool ost::Script::useBigmem
staticinherited

Definition at line 256 of file script3.h.

const char* ost::Script::var_prefix
staticinherited

Definition at line 295 of file script3.h.


The documentation for this class was generated from the following file: