\section{ost::Script\-Symbol Class Reference} \label{classost_1_1_script_symbol}\index{ost::ScriptSymbol@{ost::Script\-Symbol}} This class manages symbol tables for the scripting engine. Symbol table management for scripting engine. {\tt \#include $<$script.h$>$} Inheritance diagram for ost::Script\-Symbol::\begin{figure}[H] \begin{center} \leavevmode \includegraphics[height=3cm]{classost_1_1_script_symbol} \end{center} \end{figure} \subsection*{Public Methods} \begin{CompactItemize} \item {\bf scriptsymbol\_\-t} $\ast$ {\bf get\-Trigger} (void) \begin{CompactList}\small\item\em Fetch a pending trigger value and clear it.\item\end{CompactList}\item int {\bf get\-Symbol\-Size} (void) \begin{CompactList}\small\item\em Fetch default symbol size.\item\end{CompactList}\item {\bf Script\-Symbol} (int size, int pgsize=1024) \item char $\ast$ {\bf get\-Symbol} (const char $\ast$symbol) \begin{CompactList}\small\item\em Fetch the address of the value of a given symbol identifier.\item\end{CompactList}\item char $\ast$ {\bf set\-Symbol} (const char $\ast$symbol, const char $\ast$value=\char`\"{}\char`\"{}) \begin{CompactList}\small\item\em Set a given symbol to a new value.\item\end{CompactList}\item char $\ast$ {\bf set\-Const} (const char $\ast$symbol, const char $\ast$value=\char`\"{}\char`\"{}) \begin{CompactList}\small\item\em Set a constant value.\item\end{CompactList}\item bool {\bf make\-Sequence} (const char $\ast$id, unsigned char count, unsigned char recsize) \begin{CompactList}\small\item\em Create a sequence object (looping fifo).\item\end{CompactList}\item bool {\bf make\-Stack} (const char $\ast$id, unsigned char count, unsigned char recsize) \begin{CompactList}\small\item\em Create a stack object.\item\end{CompactList}\item bool {\bf make\-Fifo} (const char $\ast$id, unsigned char count, unsigned char recsize) \begin{CompactList}\small\item\em Create a fifo object.\item\end{CompactList}\item bool {\bf make\-Counter} (const char $\ast$id) \begin{CompactList}\small\item\em Create an automatic counter object.\item\end{CompactList}\item bool {\bf post\-Symbol} ({\bf scriptsymbol\_\-t} $\ast$sym, const char $\ast$value) \begin{CompactList}\small\item\em Post data into a fifo.\item\end{CompactList}\item char $\ast$ {\bf read\-Symbol} ({\bf scriptsymbol\_\-t} $\ast$sym) \begin{CompactList}\small\item\em Read symbol handles special symbol types.\item\end{CompactList}\item bool {\bf set\-Alias} (const char $\ast$symbol, const char $\ast$source) \begin{CompactList}\small\item\em Set an alias.\item\end{CompactList}\item {\bf scriptsymbol\_\-t} $\ast$ {\bf get\-Alias} (const char $\ast$symbol) \begin{CompactList}\small\item\em Get an alias.\item\end{CompactList}\item char $\ast$ {\bf set\-Symbol} (const char $\ast$symbol, int size=0) \begin{CompactList}\small\item\em Create a new symbol entry of a specified size.\item\end{CompactList}\item void {\bf clr\-Symbol} (const char $\ast$id) \begin{CompactList}\small\item\em Clear a symbol definition.\item\end{CompactList}\item void {\bf Purge} (void) \begin{CompactList}\small\item\em Purge user defined symbols and memory space.\item\end{CompactList}\end{CompactItemize} \subsection*{Protected Methods} \begin{CompactItemize} \item virtual {\bf scriptsymbol\_\-t} $\ast$ {\bf get\-Entry} (const char $\ast$symbol, int size=0) \begin{CompactList}\small\item\em Fetch a symbol entry.\item\end{CompactList}\item virtual void {\bf Commit} ({\bf scriptsymbol\_\-t} $\ast$sym) \begin{CompactList}\small\item\em A virtual method used when \char`\"{}committing\char`\"{} symbol changes.\item\end{CompactList}\end{CompactItemize} \subsection*{Friends} \begin{CompactItemize} \item class {\bf Script\-Interp} \end{CompactItemize} \subsection{Detailed Description} 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. \begin{Desc} \item[Author: ]\par David Sugar $<${\tt dyfet@ostel.com}$>$ \end{Desc} \subsection{Constructor \& Destructor Documentation} \index{ost::ScriptSymbol@{ost::Script\-Symbol}!ScriptSymbol@{ScriptSymbol}} \index{ScriptSymbol@{ScriptSymbol}!ost::ScriptSymbol@{ost::Script\-Symbol}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}ost::Script\-Symbol::Script\-Symbol (int {\em size}, int {\em pgsize} = 1024)}\label{classost_1_1_script_symbol_a2} \subsection{Member Function Documentation} \index{ost::ScriptSymbol@{ost::Script\-Symbol}!Commit@{Commit}} \index{Commit@{Commit}!ost::ScriptSymbol@{ost::Script\-Symbol}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void ost::Script\-Symbol::Commit ({\bf scriptsymbol\_\-t} $\ast$ {\em sym})\hspace{0.3cm}{\tt [protected, virtual]}}\label{classost_1_1_script_symbol_b1} A virtual method used when \char`\"{}committing\char`\"{} 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.\begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em symbol}]to commit. \end{description} \end{Desc} \index{ost::ScriptSymbol@{ost::Script\-Symbol}!Purge@{Purge}} \index{Purge@{Purge}!ost::ScriptSymbol@{ost::Script\-Symbol}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ost::Script\-Symbol::Purge (void)}\label{classost_1_1_script_symbol_a16} Purge user defined symbols and memory space. \index{ost::ScriptSymbol@{ost::Script\-Symbol}!clrSymbol@{clrSymbol}} \index{clrSymbol@{clrSymbol}!ost::ScriptSymbol@{ost::Script\-Symbol}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ost::Script\-Symbol::clr\-Symbol (const char $\ast$ {\em id})}\label{classost_1_1_script_symbol_a15} 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.\begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em symbol}]name to clear. \end{description} \end{Desc} \index{ost::ScriptSymbol@{ost::Script\-Symbol}!getAlias@{getAlias}} \index{getAlias@{getAlias}!ost::ScriptSymbol@{ost::Script\-Symbol}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf scriptsymbol\_\-t}$\ast$ ost::Script\-Symbol::get\-Alias (const char $\ast$ {\em symbol})}\label{classost_1_1_script_symbol_a13} Get an alias. \begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em symbol}]name to find. \end{description} \end{Desc} \begin{Desc} \item[Returns: ]\par script symbol object or NULL. \end{Desc} \index{ost::ScriptSymbol@{ost::Script\-Symbol}!getEntry@{getEntry}} \index{getEntry@{getEntry}!ost::ScriptSymbol@{ost::Script\-Symbol}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf scriptsymbol\_\-t}$\ast$ ost::Script\-Symbol::get\-Entry (const char $\ast$ {\em symbol}, int {\em size} = 0)\hspace{0.3cm}{\tt [protected, virtual]}}\label{classost_1_1_script_symbol_b0} Fetch a symbol entry. Normally this is presumed to be from the native symbol table. However, the use of a virtual allows one to derive special \char`\"{}system\char`\"{} 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 \char`\"{}symbol space\char`\"{}. \begin{Desc} \item[Returns: ]\par symbol entry or NULL if not found. \end{Desc} \begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em symbol}]name to find or create. \item[{\em size}]of symbol space to create if not found. \end{description} \end{Desc} \index{ost::ScriptSymbol@{ost::Script\-Symbol}!getSymbol@{getSymbol}} \index{getSymbol@{getSymbol}!ost::ScriptSymbol@{ost::Script\-Symbol}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ ost::Script\-Symbol::get\-Symbol (const char $\ast$ {\em symbol})}\label{classost_1_1_script_symbol_a3} Fetch the address of the value of a given symbol identifier. \begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em symbol}]name. \end{description} \end{Desc} \begin{Desc} \item[Returns: ]\par symbol buffer address, or NULL if not found. \end{Desc} \index{ost::ScriptSymbol@{ost::Script\-Symbol}!getSymbolSize@{getSymbolSize}} \index{getSymbolSize@{getSymbolSize}!ost::ScriptSymbol@{ost::Script\-Symbol}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int ost::Script\-Symbol::get\-Symbol\-Size (void)\hspace{0.3cm}{\tt [inline]}}\label{classost_1_1_script_symbol_a1} Fetch default symbol size. \begin{Desc} \item[Returns: ]\par default symbol size. \end{Desc} \index{ost::ScriptSymbol@{ost::Script\-Symbol}!getTrigger@{getTrigger}} \index{getTrigger@{getTrigger}!ost::ScriptSymbol@{ost::Script\-Symbol}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf scriptsymbol\_\-t}$\ast$ ost::Script\-Symbol::get\-Trigger (void)}\label{classost_1_1_script_symbol_a0} Fetch a pending trigger value and clear it. \begin{Desc} \item[Returns: ]\par symbol trigger that is active. \end{Desc} \index{ost::ScriptSymbol@{ost::Script\-Symbol}!makeCounter@{makeCounter}} \index{makeCounter@{makeCounter}!ost::ScriptSymbol@{ost::Script\-Symbol}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool ost::Script\-Symbol::make\-Counter (const char $\ast$ {\em id})}\label{classost_1_1_script_symbol_a9} Create an automatic counter object. \begin{Desc} \item[Returns: ]\par false if fail. \end{Desc} \begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em name}]of counter. \end{description} \end{Desc} \index{ost::ScriptSymbol@{ost::Script\-Symbol}!makeFifo@{makeFifo}} \index{makeFifo@{makeFifo}!ost::ScriptSymbol@{ost::Script\-Symbol}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool ost::Script\-Symbol::make\-Fifo (const char $\ast$ {\em id}, unsigned char {\em count}, unsigned char {\em recsize})}\label{classost_1_1_script_symbol_a8} Create a fifo object. \begin{Desc} \item[Returns: ]\par false if fail. \end{Desc} \begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em name}]of fifo. \item[{\em number}]of records. \item[{\em size}]of record. \end{description} \end{Desc} \index{ost::ScriptSymbol@{ost::Script\-Symbol}!makeSequence@{makeSequence}} \index{makeSequence@{makeSequence}!ost::ScriptSymbol@{ost::Script\-Symbol}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool ost::Script\-Symbol::make\-Sequence (const char $\ast$ {\em id}, unsigned char {\em count}, unsigned char {\em recsize})}\label{classost_1_1_script_symbol_a6} Create a sequence object (looping fifo). \begin{Desc} \item[Returns: ]\par false if fail. \end{Desc} \begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em name}]of sequence. \item[{\em max.}]number of sequences. \item[{\em size}]of sequence data record. \end{description} \end{Desc} \index{ost::ScriptSymbol@{ost::Script\-Symbol}!makeStack@{makeStack}} \index{makeStack@{makeStack}!ost::ScriptSymbol@{ost::Script\-Symbol}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool ost::Script\-Symbol::make\-Stack (const char $\ast$ {\em id}, unsigned char {\em count}, unsigned char {\em recsize})}\label{classost_1_1_script_symbol_a7} Create a stack object. \begin{Desc} \item[Returns: ]\par false if fail. \end{Desc} \begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em name}]of stack. \item[{\em number}]of entries. \item[{\em size}]of record. \end{description} \end{Desc} \index{ost::ScriptSymbol@{ost::Script\-Symbol}!postSymbol@{postSymbol}} \index{postSymbol@{postSymbol}!ost::ScriptSymbol@{ost::Script\-Symbol}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool ost::Script\-Symbol::post\-Symbol ({\bf scriptsymbol\_\-t} $\ast$ {\em sym}, const char $\ast$ {\em value})}\label{classost_1_1_script_symbol_a10} Post data into a fifo. \begin{Desc} \item[Returns: ]\par false if full. \end{Desc} \begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em symbol}]object to post. \item[{\em data}]value to post. \end{description} \end{Desc} \index{ost::ScriptSymbol@{ost::Script\-Symbol}!readSymbol@{readSymbol}} \index{readSymbol@{readSymbol}!ost::ScriptSymbol@{ost::Script\-Symbol}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ ost::Script\-Symbol::read\-Symbol ({\bf scriptsymbol\_\-t} $\ast$ {\em sym})}\label{classost_1_1_script_symbol_a11} Read symbol handles special symbol types. \begin{Desc} \item[Returns: ]\par data of symbol. \end{Desc} \begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em symbol.}]\end{description} \end{Desc} \index{ost::ScriptSymbol@{ost::Script\-Symbol}!setAlias@{setAlias}} \index{setAlias@{setAlias}!ost::ScriptSymbol@{ost::Script\-Symbol}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool ost::Script\-Symbol::set\-Alias (const char $\ast$ {\em symbol}, const char $\ast$ {\em source})}\label{classost_1_1_script_symbol_a12} Set an alias. \begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em symbol}]name to alias. \item[{\em value}]of alias to set. \end{description} \end{Desc} \begin{Desc} \item[Returns: ]\par bool if not set, else value. \end{Desc} \index{ost::ScriptSymbol@{ost::Script\-Symbol}!setConst@{setConst}} \index{setConst@{setConst}!ost::ScriptSymbol@{ost::Script\-Symbol}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ ost::Script\-Symbol::set\-Const (const char $\ast$ {\em symbol}, const char $\ast$ {\em value} = \char`\"{}\char`\"{})}\label{classost_1_1_script_symbol_a5} Set a constant value. \begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em symbol}]name to find. \item[{\em value}]string to set. \end{description} \end{Desc} \begin{Desc} \item[Returns: ]\par NULL if not found, else value. \end{Desc} \index{ost::ScriptSymbol@{ost::Script\-Symbol}!setSymbol@{setSymbol}} \index{setSymbol@{setSymbol}!ost::ScriptSymbol@{ost::Script\-Symbol}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ ost::Script\-Symbol::set\-Symbol (const char $\ast$ {\em symbol}, int {\em size} = 0)}\label{classost_1_1_script_symbol_a14} Create a new symbol entry of a specified size. \begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em symbol}]name to create. \item[{\em size}]of symbol, otherwise default size used. \item[{\em buffer}]or NULL if exists. \end{description} \end{Desc} \index{ost::ScriptSymbol@{ost::Script\-Symbol}!setSymbol@{setSymbol}} \index{setSymbol@{setSymbol}!ost::ScriptSymbol@{ost::Script\-Symbol}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ ost::Script\-Symbol::set\-Symbol (const char $\ast$ {\em symbol}, const char $\ast$ {\em value} = \char`\"{}\char`\"{})}\label{classost_1_1_script_symbol_a4} Set a given symbol to a new value. \begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em symbol}]name to find. \item[{\em value}]string to set. \end{description} \end{Desc} \begin{Desc} \item[Returns: ]\par NULL if not found, else value. \end{Desc} \subsection{Friends And Related Function Documentation} \index{ost::ScriptSymbol@{ost::Script\-Symbol}!ScriptInterp@{ScriptInterp}} \index{ScriptInterp@{ScriptInterp}!ost::ScriptSymbol@{ost::Script\-Symbol}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}friend class Script\-Interp\hspace{0.3cm}{\tt [friend]}}\label{classost_1_1_script_symbol_l0} The documentation for this class was generated from the following file:\begin{CompactItemize} \item {\bf script.h}\end{CompactItemize}