Bayonne2 / Common C++ 2 Framework
Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes
ost::ScriptChecks Class Reference

#include <script3.h>

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

Public Types

 
typedef enum scrAccess  scrAccess
 
 
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

const char *  chkIgnore (Line *line, ScriptImage *img)
  Default compiler syntax to accept any syntax. More...
 
const char *  chkUse (Line *line, ScriptImage *img)
  Performs DSO load phase for USE modules. More...
 
const char *  chkHasModify (Line *line, ScriptImage *img)
  A check used by "inc" and "dec". More...
 
const char *  chkProperty (Line *line, ScriptImage *img)
  Check if member is NULL or a property reference. More...
 
const char *  chkFirstVar (Line *line, ScriptImage *img)
  A check for first var... More...
 
const char *  chkType (Line *line, ScriptImage *img)
  A basic type check for simple type declarations... More...
 
const char *  chkHasVars (Line *line, ScriptImage *img)
  Script compiler syntax check for certain variable using statements such as "clear". More...
 
const char *  chkHasList (Line *line, ScriptImage *img)
  Script compiler syntax check for assignment statements such as "set", "for", etc. More...
 
const char *  chkNoArgs (Line *line, ScriptImage *img)
  Script compiler syntax check for commands that require no arguments to be present. More...
 
const char *  chkAllVars (Line *line, ScriptImage *img)
  Script compiler syntax check for commands that require all arguments to be symbols. More...
 
const char *  chkHasArgs (Line *line, ScriptImage *img)
  Script compiler syntax check for commands that require one or more arguments to be present. More...
 
const char *  chkOnlyArgs (Line *line, ScriptImage *img)
  Script compiler syntax check for commands that require one or more arguments but use no keywords. More...
 
const char *  chkOnlyOneArg (Line *line, ScriptImage *img)
 
const char *  chkRefArgs (Line *line, ScriptImage *img)
 
const char *  chkSlog (Line *line, ScriptImage *img)
 
const char *  chkExpression (Line *line, ScriptImage *img)
 
const char *  chkConditional (Line *line, ScriptImage *img)
 
const char *  chkGoto (Line *line, ScriptImage *img)
 
const char *  chkLabel (Line *line, ScriptImage *img)
 
const char *  chkCall (Line *line, ScriptImage *img)
 
const char *  chkReturn (Line *line, ScriptImage *img)
 
const char *  chkRestart (Line *line, ScriptImage *img)
 
const char *  chkVar (Line *line, ScriptImage *img)
 
const char *  chkVarType (Line *line, ScriptImage *img)
 
const char *  chkDecimal (Line *line, ScriptImage *img)
 
const char *  chkNumber (Line *line, ScriptImage *img)
 
const char *  chkString (Line *line, ScriptImage *img)
 
const char *  chkChar (Line *line, ScriptImage *img)
 
const char *  chkExpr (Line *line, ScriptImage *img)
 
const char *  chkIndex (Line *line, ScriptImage *img)
 
const char *  chkError (Line *line, ScriptImage *img)
 
const char *  chkConst (Line *line, ScriptImage *img)
 
const char *  chkSequence (Line *line, ScriptImage *img)
 
const char *  chkSignal (Line *line, ScriptImage *img)
 
const char *  chkThrow (Line *line, ScriptImage *img)
 
const char *  chkSet (Line *line, ScriptImage *img)
 
const char *  chkRepeat (Line *line, ScriptImage *img)
 
const char *  chkArray (Line *line, ScriptImage *img)
 
const char *  chkFor (Line *line, ScriptImage *img)
 
const char *  chkForeach (Line *line, ScriptImage *img)
 
const char *  chkCat (Line *line, ScriptImage *img)
 
const char *  chkRemove (Line *line, ScriptImage *img)
 
const char *  chkOnlyCommand (Line *line, ScriptImage *img)
 
const char *  chkCounter (Line *line, ScriptImage *img)
 
const char *  chkTimer (Line *line, ScriptImage *img)
 
const char *  chkClear (Line *line, ScriptImage *img)
 
const char *  chkPack (Line *line, ScriptImage *img)
 
const char *  chkConstruct (Line *line, ScriptImage *img)
 
const char *  chkLock (Line *line, ScriptImage *img)
 
const char *  chkSession (Line *line, ScriptImage *img)
 
const char *  chkKeywords (Line *line, ScriptImage *img)
 
const char *  chkDefine (Line *line, ScriptImage *img)
 
virtual bool  isInput (Line *line)
  Checks if the line statement is an input statement. More...
 
Method  getHandler (const char *keyword)
  Get the method handler associated with a given keyword. More...
 
bool  control (char **args)
  Issue a control event against current image for attached modules until claimed. More...
 
  Get the active script. More...
 
const char *  getTrapName (unsigned id)
  Get the name of a trap from it's id. More...
 
void  aliasModule (const char *id, const char *use)
  Alias use modules... More...
 
virtual void  errlog (const char *level, const char *text)
  Server level logging interface override. More...
 
int  getCount (const char *sym)
  Get a count of the number of data "values" that is associated with a specific keyword. 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...
 
unsigned  getActivity (void)
  Get activity counter. 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...
 
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  nameMutex (const char *name)
  Enable setting of mutex name for deadlock debug. More...
 
void  enterMutex (void)
  Entering a Mutex locks the mutex for the current thread. More...
 
void  enter (void)
  Future abi will use enter/leave/test members. More...
 
void  leave (void)
  Future abi will use enter/leave/test members. More...
 
bool  test (void)
  Future abi will use enter/leave/test members. More...
 
bool  tryEnterMutex (void)
  Tries to lock the mutex for the current thread. More...
 
void  leaveMutex (void)
  Leaving a mutex frees that mutex for use by another thread. More...
 

Static Public Member Functions

static const char *  findKeyword (Line *line, const char *keyword)
  Test for a specific keyword. More...
 
static const char *  findKeyword (ScriptImage *img, Line *line, const char *keyword)
  Test for a specific keyword or keydata filler. More...
 
static bool  useKeywords (Line *line, const char *list)
  Test current command against a list of valid keywords. More...
 
static unsigned  getCount (Line *line)
  Count non-keyword arguments. More...
 
static const char *  getMember (Line *line)
  Get the member id code of a line. More...
 
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 void  setDebug (bool mode)
  Enable or disable deadlock debugging. More...
 
static bool  isScript (Name *scr)
 
static bool  isSymbol (const char *id)
 
static bool  use (const char *name)
 
static Symbolderef (Symbol *sym)
 
static bool  commit (Symbol *sym, const char *value)
 
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 Member Functions

virtual const char *  getExternal (const char *opt)
 
bool  isInitial (const char *keyword)
  Fetch whether the given keyword is valid for constructor. More...
 
const char *  check (char *command, Line *line, ScriptImage *img)
  Check keyword syntax. More...
 
virtual const char *  check (Check chk, Line *line, ScriptImage *img)
  Perform compile time check of a specified symbol. More...
 
virtual unsigned  getTrapId (const char *name)
  Get the trap id number associated with a trap name. More...
 
virtual unsigned long  getTrapDefault (void)
  Get the mask bits for the default script. More...
 
virtual unsigned long  getTrapHandler (Name *script)
  Get the mask bits for a trap "handler". More...
 
virtual unsigned long  getTrapMask (unsigned id)
  Get a trap mask for a given identifer. More...
 
virtual unsigned long  getTrapMask (const char *name)
  A helper method for the compiler used specifically for "^" trap subsection requests. More...
 
virtual unsigned long  getTrapModifier (const char *name)
  A helper method for the compiler. More...
 
unsigned  getCount (void)
  Get count of active traps. More...
 
  Load a set of keywords into the system keyword table. More...
 
int  trap (const char *name, bool inherited=true)
  Add a trap handler symbolic identity to the keyword table. More...
 
bool  isInherited (unsigned id)
  Return true if the trap id is inherited. 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  purge (void)
  purge the current memory pool. 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...
 

Static Protected Member Functions

static bool  hasKeywords (Line *line)
  Test current command to see if it uses keyword syntax. More...
 
static bool  useMember (Line *line, const char *list)
  Check the member list. More...
 
static const char *  getOption (Line *line, unsigned *index)
  Get an option to examine in check routine. More...
 

Protected Attributes

bool  ripple
 
unsigned  activity
 

Static Protected Attributes

static ScriptCommandruntime
 
static Testtest
 
static Funifun
 

Detailed Description

Definition at line 696 of file script3.h.

Member Typedef Documentation

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.

inherited

Definition at line 121 of file script3.h.

inherited
inherited

Definition at line 145 of file script3.h.

Member Enumeration Documentation

inherited
Enumerator
scrPUBLIC 
scrPROTECTED 
scrPRIVATE 
scrFUNCTION 
scrLOCAL 

Definition at line 113 of file script3.h.

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.

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::ScriptCommand::aliasModule ( const char *  id,
const char *  use 
)
inherited

Alias use modules...

Parameters
id to alias.
id to use.
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
size size 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
str string to allocate and copy into paged memory pool.
Returns
copy of string from allocated memory.
static bool ost::Script::append ( Symbolsym,
const char *  value 
)
staticinherited
const char* ost::ScriptCommand::check ( char *  command,
Lineline,
ScriptImageimg 
)
protectedinherited

Check keyword syntax.

Returns
syntax error string or NULL.
Parameters
command name of keyword to check.
line pointer to line being compiled.
img pointer to image being compiled.
virtual const char* ost::ScriptCommand::check ( Check  chk,
Lineline,
ScriptImageimg 
)
protectedvirtualinherited

Perform compile time check of a specified symbol.

Returns
syntax error message string.
Parameters
chk object pointer to check member function.
line pointer to line being checked.
img pointer to image being compiled.
const char* ost::ScriptChecks::chkAllVars ( Lineline,
ScriptImageimg 
)

Script compiler syntax check for commands that require all arguments to be symbols.

Returns
syntax error message string or NULL.
Parameters
line pointer being examined.
img pointer to image being compiled.
const char* ost::ScriptChecks::chkArray ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkCall ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkCat ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkChar ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkClear ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkConditional ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkConst ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkConstruct ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkCounter ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkDecimal ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkDefine ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkError ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkExpr ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkExpression ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkFirstVar ( Lineline,
ScriptImageimg 
)

A check for first var...

Returns
syntax error message string or NULL.
Parameters
line statement being examined.
img pointer to image being compiled.
const char* ost::ScriptChecks::chkFor ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkForeach ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkGoto ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkHasArgs ( Lineline,
ScriptImageimg 
)

Script compiler syntax check for commands that require one or more arguments to be present.

Returns
syntax error message string or NULL.
Parameters
line statement being examined.
img pointer to image being compiled.
const char* ost::ScriptChecks::chkHasList ( Lineline,
ScriptImageimg 
)

Script compiler syntax check for assignment statements such as "set", "for", etc.

Returns
syntax error message string or NULL.
Parameters
line statement being examined.
img pointer to image being compiled.
const char* ost::ScriptChecks::chkHasModify ( Lineline,
ScriptImageimg 
)

A check used by "inc" and "dec".

Returns
synxtax error message string or NULL.
Parameters
line statement being examined.
img pointer to image being examined.
const char* ost::ScriptChecks::chkHasVars ( Lineline,
ScriptImageimg 
)

Script compiler syntax check for certain variable using statements such as "clear".

Assumes list of valid variable arguments.

Returns
syntax error message string or NULL.
Parameters
line statement being examined.
img pointer to image being compiled.
const char* ost::ScriptChecks::chkIgnore ( Lineline,
ScriptImageimg 
)

Default compiler syntax to accept any syntax.

const char* ost::ScriptChecks::chkIndex ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkKeywords ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkLabel ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkLock ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkNoArgs ( Lineline,
ScriptImageimg 
)

Script compiler syntax check for commands that require no arguments to be present.

Returns
syntax error message string or NULL.
Parameters
line statement being examined.
img pointer to image being compiled.
const char* ost::ScriptChecks::chkNumber ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkOnlyArgs ( Lineline,
ScriptImageimg 
)

Script compiler syntax check for commands that require one or more arguments but use no keywords.

Returns
syntax error message string or NULL.
Parameters
line statement being examined.
img pointer to image being compiled.
const char* ost::ScriptChecks::chkOnlyCommand ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkOnlyOneArg ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkPack ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkProperty ( Lineline,
ScriptImageimg 
)

Check if member is NULL or a property reference.

Parameters
line pointer to line checked for property reference.
img pointer to image being compiled.
Returns
syntax error message string or NULL.
const char* ost::ScriptChecks::chkRefArgs ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkRemove ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkRepeat ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkRestart ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkReturn ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkSequence ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkSession ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkSet ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkSignal ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkSlog ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkString ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkThrow ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkTimer ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkType ( Lineline,
ScriptImageimg 
)

A basic type check for simple type declarations...

Returns
syntax error message string or NULL.
Parameters
line statement being examined.
img pointer to image being compiled.
const char* ost::ScriptChecks::chkUse ( Lineline,
ScriptImageimg 
)

Performs DSO load phase for USE modules.

const char* ost::ScriptChecks::chkVar ( Lineline,
ScriptImageimg 
)
const char* ost::ScriptChecks::chkVarType ( Lineline,
ScriptImageimg 
)
void MemPager::clean ( void  )
protectedinherited

Clean for memory cleanup before exiting.

static void ost::Script::clear ( Symbolsym )
staticinherited
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 ( Symbolsym,
const char *  value 
)
staticinherited
bool ost::ScriptCommand::control ( char **  args )
inherited

Issue a control event against current image for attached modules until claimed.

Parameters
args list of control command and arguments.
Returns
true if processed.
static unsigned ost::Script::count ( Symbolsym )
staticinherited
static Symbol* ost::Script::deref ( Symbolsym )
staticinherited
static void Keydata::end ( void  )
staticinherited

static member to end keydata i/o allocations.

void Mutex::enter ( void  )
inlineinherited

Future abi will use enter/leave/test members.

Definition at line 263 of file thread.h.

void Mutex::enterMutex ( void  )
inherited

Entering a Mutex locks the mutex for the current thread.

This also can be done using the ENTER_CRITICAL macro or by using the ++ operator on a mutex.

See Also
leaveMutex
virtual void ost::ScriptCommand::errlog ( const char *  level,
const char *  text 
)
virtualinherited

Server level logging interface override.

Parameters
level of log message.
text of message.
static const char* ost::Script::extract ( Symbolsym )
staticinherited
static const char* ost::ScriptCommand::findKeyword ( Lineline,
const char *  keyword 
)
staticinherited

Test for a specific keyword.

Returns
content of keyword that is found.
Parameters
line pointer to record to examine in check routine.
keyword to search for.
static const char* ost::ScriptCommand::findKeyword ( ScriptImageimg,
Lineline,
const char *  keyword 
)
staticinherited

Test for a specific keyword or keydata filler.

Returns
content of keyword that is found.
Parameters
script image for keydata.
line pointer to record to examine in check routine.
keyword to search for.
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
size size 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
str string to allocate and copy into paged memory pool.
Returns
copy of string from allocated memory.
ScriptImage* ost::ScriptCommand::getActive ( void  )
inlineinherited

Get the active script.

Returns
pointer to active script image.

Definition at line 417 of file script3.h.

unsigned ost::ScriptCommand::getActivity ( void  )
inlineinherited

Get activity counter.

Returns
activity counter.

Definition at line 647 of file script3.h.

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

Get a bool value.

Parameters
sym keyword name.
Returns
true or false.
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
sym keyword symbol name.
Returns
count of values associated with keyword.
static unsigned ost::ScriptCommand::getCount ( Lineline )
staticinherited

Count non-keyword arguments.

Returns
number of non-keyword arguments.
Parameters
line record to examine.
unsigned ost::ScriptCommand::getCount ( void  )
inlineprotectedinherited

Get count of active traps.

Returns
count of active trap identifiers.

Definition at line 613 of file script3.h.

double Keydata::getDouble ( const char *  key,
double  def = 0. 
)
inherited

Get a floating value.

Parameters
sym keyword name.
default if not set.
Returns
value of key.
virtual const char* ost::ScriptCommand::getExternal ( const char *  opt )
protectedvirtualinherited
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
sym keyword symbol name.
Returns
first set value for this symbol.
Method ost::ScriptCommand::getHandler ( const char *  keyword )
inherited

Get the method handler associated with a given keyword.

This is used by ScriptImage when compiling.

Parameters
keyword to search for.
Returns
method handler to execute for this keyword.
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
data pointer of array to hold keyword strings.
max number of entries the array can hold.
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
sym keyword 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
sym keyword name to fetch.
long Keydata::getLong ( const char *  sym,
long  def = 0 
)
inherited

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

Parameters
sym keyword name.
default if not present.
Returns
long value of key.
static const char* ost::ScriptCommand::getMember ( Lineline )
staticinherited

Get the member id code of a line.

Returns
member id code.
Parameters
line record to examine in check routine.
static const char* ost::ScriptCommand::getOption ( Lineline,
unsigned *  index 
)
staticprotectedinherited

Get an option to examine in check routine.

Returns
option or NULL if past end of line record.
Parameters
line record pointer to line to examine.
index pointer to index value. Start at 0.
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.

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

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

Parameters
sym keyword name.
default if not present.
Returns
string value of key.
Keysym* Keydata::getSymbol ( const char *  sym,
bool  create 
)
protectedinherited
virtual unsigned long ost::ScriptCommand::getTrapDefault ( void  )
protectedvirtualinherited

Get the mask bits for the default script.

Returns
trap mask to use.
virtual unsigned long ost::ScriptCommand::getTrapHandler ( Namescript )
protectedvirtualinherited

Get the mask bits for a trap "handler".

Returns
script object of trap mask to use.
virtual unsigned ost::ScriptCommand::getTrapId ( const char *  name )
protectedvirtualinherited

Get the trap id number associated with a trap name.

Returns
trap id number, 0 (exit) if invalid.
Parameters
name of trap identifier.
virtual unsigned long ost::ScriptCommand::getTrapMask ( unsigned  id )
protectedvirtualinherited

Get a trap mask for a given identifer.

This is a virtual since some derived handlers may manipulate mask bits.

Returns
signal bit mask based on id number.
Parameters
id number of trap mask.
virtual unsigned long ost::ScriptCommand::getTrapMask ( const char *  name )
protectedvirtualinherited

A helper method for the compiler used specifically for "^" trap subsection requests.

These will occasionally carry different attribute settings.

Parameters
name of trap identifier.
Returns
bit shifted mask or 0 if invalid.
virtual unsigned long ost::ScriptCommand::getTrapModifier ( const char *  name )
protectedvirtualinherited

A helper method for the compiler.

Converts a named trap into it's bit shifted mask. By making it a virtual, derived dialects can add "aliases" to default trap names.

Parameters
name of trap identifier.
Returns
bit shifted mask or 0 if invalid.
const char* ost::ScriptCommand::getTrapName ( unsigned  id )
inherited

Get the name of a trap from it's id.

Parameters
id of trap.
Returns
name of trap.
static bool ost::ScriptCommand::hasKeywords ( Lineline )
staticprotectedinherited

Test current command to see if it uses keyword syntax.

Returns
true if keyword syntax used.
Parameters
line record to examine in check routine.
static bool ost::Script::isFunction ( Namescr )
staticinherited
bool ost::ScriptCommand::isInherited ( unsigned  id )
protectedinherited

Return true if the trap id is inherited.

bool ost::ScriptCommand::isInitial ( const char *  keyword )
protectedinherited

Fetch whether the given keyword is valid for constructor.

Parameters
keyword to search for.
Returns
init flag.
virtual bool ost::ScriptCommand::isInput ( Lineline )
virtualinherited

Checks if the line statement is an input statement.

Used in some servers...

Returns
true if line is input.
Parameters
line to examine.
bool Keydata::isKey ( const char *  sym )
inherited

Find if a given key exists.

Parameters
sym keyword to find.
Returns
true if exists.
static bool ost::Script::isPrivate ( Namescr )
staticinherited
static bool ost::Script::isScript ( Namescr )
staticinherited
static bool ost::Script::isSymbol ( const char *  id )
staticinherited
void Mutex::leave ( void  )
inlineinherited

Future abi will use enter/leave/test members.

Definition at line 269 of file thread.h.

void Mutex::leaveMutex ( void  )
inherited

Leaving a mutex frees that mutex for use by another thread.

If the mutex has been entered (invoked) multiple times (recursivily) by the same thread, then it will need to be exited the same number of instances before it is free for re-use. This operation can also be done using the LEAVE_CRITICAL macro or by the – operator on a mutex.

See Also
enterMutex
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 ( Definepairs )
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
pairs list of NULL terminated default keyword/value pairs.
void ost::ScriptCommand::load ( Script::Definekeywords )
protectedinherited

Load a set of keywords into the system keyword table.

This provides a convenient method of initializing and adding to the keyword indexes.

Parameters
keywords defined pair entries 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
filepath to load from
keys section to parse from, or NULL to parse from head
pre optional 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)
void Mutex::nameMutex ( const char *  name )
inlineinherited

Enable setting of mutex name for deadlock debug.

Parameters
name for mutex.

Definition at line 248 of file thread.h.

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.

void MemPager::purge ( void  )
protectedinherited

purge the current memory pool.

static void Mutex::setDebug ( bool  mode )
inlinestaticinherited

Enable or disable deadlock debugging.

Parameters
mode debug mode.

Definition at line 240 of file thread.h.

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
sym keyword name to set.
data string to store for the keyword.
static unsigned ost::Script::storage ( Symbolsym )
staticinherited
static bool ost::Script::symindex ( Symbolsym,
short  offset 
)
staticinherited
bool Mutex::test ( void  )
inlineinherited

Future abi will use enter/leave/test members.

Returns
true if entered.

Definition at line 277 of file thread.h.

int ost::ScriptCommand::trap ( const char *  name,
bool  inherited = true 
)
protectedinherited

Add a trap handler symbolic identity to the keyword table.

These are used to handle signal mask coercion and event branch points in the compiler.

Parameters
name of requested trap to add to the trap table.
inherited status of trap.
Returns
assigned id number for the trap.
bool Mutex::tryEnterMutex ( void  )
inherited

Tries to lock the mutex for the current thread.

Behaves like enterMutex , except that it doesn't block the calling thread if the mutex is already locked by another thread.

Returns
true if locking the mutex was succesful otherwise false
See Also
enterMutex
leaveMutex
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
static bool ost::ScriptCommand::useKeywords ( Lineline,
const char *  list 
)
staticinherited

Test current command against a list of valid keywords.

Returns
first keyword found not in list.
Parameters
line record to examine in check routine.
list of =xxx keyword entries.
static bool ost::ScriptCommand::useMember ( Lineline,
const char *  list 
)
staticprotectedinherited

Check the member list.

Returns
true if member found or none.
Parameters
line record to examine in check routine.
list of .members...

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.

unsigned ost::ScriptCommand::activity
protectedinherited

Definition at line 379 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::Script::decimal
staticinherited

Definition at line 275 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.

inherited

Definition at line 102 of file script3.h.

const char* ost::Script::log_prefix
staticinherited

Definition at line 296 of file script3.h.

inherited

Definition at line 103 of file script3.h.

size_t ost::Script::pagesize
staticinherited

Definition at line 259 of file script3.h.

const char* ost::Script::plugins
staticinherited

Definition at line 281 of file script3.h.

bool ost::ScriptCommand::ripple
protectedinherited

Definition at line 378 of file script3.h.

ScriptCommand* ost::ScriptCommand::runtime
staticprotectedinherited

Definition at line 380 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:

Generated on Dec 21, 2017 for commoncpp2-1.8.1, ccrtp-1.7.2, libzrtpcpp-2.3.4, ccscript3-1.1.7, ccaudio2-1.0.0 and bayonne2-2.3.2 (after installation in /usr/local/) by   doxygen 1.8.6

AltStyle によって変換されたページ (->オリジナル) /