This class manages symbol tables for the scripting engine. Symbol table management for scripting engine.
A symbol is a variable with a reserved memory space. Some derived systems, like Bayonne IVR, may make use of a channel specific and global symbol tables.
A virtual method used when "committing" symbol changes.
Normally this is a non-operation, but when system specific dialects are created, special symbols that must be converted from strings into other kinds of internal data types, or that might perform operations can be represented with the commit.
Parameters:
symbol
to commit.
void ScriptSymbol::Purge (
void )
Purge user defined symbols and memory space.
void ScriptSymbol::clrSymbol (
const char * id )
Clear a symbol definition.
This does not remove the entry if it already exists. It mearly clears the initial flag so it still can appear undefined.
Normally this is presumed to be from the native symbol table. However, the use of a virtual allows one to derive special "system" symbols as needed for Bayonne dialects, as well as specify special attributes and properties for system symbols. For example, in the Bayonne IVR, symbols might be used to retrieve the current DTMF digit buffer and count, but these are stored as and manipulated in a channel structure rather than in "symbol space".
Returns:
symbol entry or NULL if not found.
Parameters:
symbol
name to find or create.
size
of symbol space to create if not found.
char * ScriptSymbol::getSymbol (
const char * symbol )
Fetch the address of the value of a given symbol identifier.
Parameters:
symbol
name.
Returns:
symbol buffer address, or NULL if not found.
int ScriptSymbol::getSymbolSize (
void ) [inline, protected]
Fetch default symbol size.
Returns:
default symbol size.
char * ScriptSymbol::setConst (
const char * symbol,
const char * value = "" )
Set a constant value.
Parameters:
symbol
name to find.
value
string to set.
Returns:
NULL if not found, else value.
char * ScriptSymbol::setSymbol (
const char * symbol,
int size = 0 )
Create a new symbol entry of a specified size.
Parameters:
symbol
name to create.
size
of symbol, otherwise default size used.
buffer
or NULL if exists.
char * ScriptSymbol::setSymbol (
const char * symbol,
const char * value = "" )
Set a given symbol to a new value.
Parameters:
symbol
name to find.
value
string to set.
Returns:
NULL if not found, else value.
The documentation for this class was generated from the following file: