\section{Script\-Command Class Reference} \label{class_scriptcommand}\index{ScriptCommand@{Script\-Command}} This class holds the bound keyword set for a given Bayonne style script interpreter. Bayonne script keyword binding tables and compiler constants. {\tt \#include $<$script.h$>$} Inheritance diagram for Script\-Command:\begin{figure}[H] \begin{center} \leavevmode \includegraphics[height=2cm]{class_scriptcommand} \end{center} \end{figure} \subsection*{Protected Methods} \begin{CompactItemize} \item {\bf scriptmethod\_\-t} {\bf get\-Handler} (const char $\ast$keyword) \begin{CompactList}\small\item\em Get the method handler associated with a given keyword.\item\end{CompactList}\item char$\ast$ {\bf Check} (char $\ast$command, {\bf scriptline\_\-t} $\ast$line, {\bf Script\-Image} $\ast$img) \begin{CompactList}\small\item\em Check keyword syntax.\item\end{CompactList}\item virtual unsigned {\bf get\-Trap\-Id} (const char $\ast$trap) \begin{CompactList}\small\item\em Get the trap id number associated with a trap name.\item\end{CompactList}\item virtual unsigned long {\bf get\-Trap\-Default} (void) \begin{CompactList}\small\item\em Get the mask bits for the default script.\item\end{CompactList}\item virtual unsigned long {\bf get\-Trap\-Handler} ({\bf scriptname\_\-t} $\ast$scr) \begin{CompactList}\small\item\em Get the mask bits for a trap "handler".\item\end{CompactList}\item virtual unsigned long {\bf get\-Trap\-Mask} (unsigned id) \begin{CompactList}\small\item\em Get a trap mask for a given identifer.\item\end{CompactList}\item virtual unsigned long {\bf get\-Trap\-Modifier} (const char $\ast$trapname) \begin{CompactList}\small\item\em A helper method for the compiler.\item\end{CompactList}\item virtual unsigned long {\bf get\-Trap\-Mask} (const char $\ast$trapname) \begin{CompactList}\small\item\em A helper method for the compiler used specifically for "$^\wedge$" trap subsection requests.\item\end{CompactList}\item char$\ast$ {\bf chk\-Ignore} ({\bf scriptline\_\-t} $\ast$line, {\bf Script\-Image} $\ast$img) \begin{CompactList}\small\item\em Default compiler syntax to accept any syntax.\item\end{CompactList}\item char$\ast$ {\bf chk\-Module} ({\bf scriptline\_\-t} $\ast$line, {\bf Script\-Image} $\ast$img) \begin{CompactList}\small\item\em Module based script checker.\item\end{CompactList}\item char$\ast$ {\bf chk\-Use} ({\bf scriptline\_\-t} $\ast$line, {\bf Script\-Image} $\ast$img) \begin{CompactList}\small\item\em Performs {\bf DSO} {\rm (p.\,\pageref{class_dso})} load phase for USE modules.\item\end{CompactList}\item char$\ast$ {\bf chk\-Has\-Modify} ({\bf scriptline\_\-t} $\ast$line, {\bf Script\-Image} $\ast$img) \begin{CompactList}\small\item\em A check used by "inc" and "dec".\item\end{CompactList}\item char$\ast$ {\bf chk\-Has\-Vars} ({\bf scriptline\_\-t} $\ast$line, {\bf Script\-Image} $\ast$img) \begin{CompactList}\small\item\em Script compiler syntax check for certain variable using statements such as "clear".\item\end{CompactList}\item char$\ast$ {\bf chk\-Has\-List} ({\bf scriptline\_\-t} $\ast$line, {\bf Script\-Image} $\ast$img) \begin{CompactList}\small\item\em Script compiler syntax check for assignment statements such as "set", "for", etc.\item\end{CompactList}\item char$\ast$ {\bf chk\-No\-Args} ({\bf scriptline\_\-t} $\ast$line, {\bf Script\-Image} $\ast$img) \begin{CompactList}\small\item\em Script compiler syntax check for commands that require no arguments to be present.\item\end{CompactList}\item char$\ast$ {\bf chk\-Has\-Args} ({\bf scriptline\_\-t} $\ast$line, {\bf Script\-Image} $\ast$img) \begin{CompactList}\small\item\em Script compiler syntax check for commands that require one or more arguments to be present.\item\end{CompactList}\item void {\bf Load} ({\bf SCRKEYWORDS} $\ast$keywords) \begin{CompactList}\small\item\em Load a set of keywords into the system keyword table.\item\end{CompactList}\item int {\bf Trap} (const char $\ast$name) \begin{CompactList}\small\item\em Add a trap handler symbolic identity to the keyword table.\item\end{CompactList}\item int {\bf get\-Count} (void) \begin{CompactList}\small\item\em Get count of active traps.\item\end{CompactList}\item virtual char$\ast$ {\bf Check} ({\bf scriptcheck\_\-t} check, {\bf scriptline\_\-t} $\ast$line, {\bf Script\-Image} $\ast$img) \begin{CompactList}\small\item\em Perform compile time check of a specified symbol.\item\end{CompactList}\item {\bf Script\-Command} (const char $\ast$cfgfile) \begin{CompactList}\small\item\em Load a keydata entry for compile-time constants and bind the default {\bf Script\-Interp} {\rm (p.\,\pageref{class_scriptinterp})} base class methods.\item\end{CompactList}\end{CompactItemize} \subsection*{Friends} \begin{CompactItemize} \item class {\bf Script\-Image} \item class {\bf Script\-Interp} \item class {\bf Script\-Module} \end{CompactItemize} \subsection{Detailed Description} This class holds the bound keyword set for a given Bayonne style script interpreter. Bayonne script keyword binding tables and compiler constants. Application specific dialects are created by deriving a application specific version of Script\-Command which then binds application specific keywords and associated methods in an application derived {\bf Script\-Interp} {\rm (p.\,\pageref{class_scriptinterp})} which are typecast to (scriptmethod\_\-t). \begin{Desc} \item[{\bf Author(s): }]\par David Sugar $<${\tt dyfet@ostel.com}$>$ \end{Desc} \subsection{Constructor \& Destructor Documentation} \index{ScriptCommand@{Script\-Command}!ScriptCommand@{ScriptCommand}} \index{ScriptCommand@{ScriptCommand}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}Script\-Command::Script\-Command (const char $\ast$ {\em cfgfile})\hspace{0.3cm}{\tt [protected]}}\label{class_scriptcommand_b20} Load a keydata entry for compile-time constants and bind the default {\bf Script\-Interp} {\rm (p.\,\pageref{class_scriptinterp})} base class methods. This class is never used alone, so no public constructor is provided.\begin{Desc} \item[{\bf Parameters: }]\par \begin{description} \item[ {\em keydata}] entry for constants. \end{description} \end{Desc} \subsection{Member Function Documentation} \index{ScriptCommand@{Script\-Command}!Check@{Check}} \index{Check@{Check}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}char $\ast$ Script\-Command::Check ({\bf scriptcheck\_\-t} {\em check}, {\bf scriptline\_\-t} $\ast$ {\em line}, {\bf Script\-Image} $\ast$ {\em img})\hspace{0.3cm}{\tt [inline, protected, virtual]}}\label{class_scriptcommand_b19} Perform compile time check of a specified symbol. \begin{Desc} \item[{\bf Returns: }]\par syntax error message string. \end{Desc} \begin{Desc} \item[{\bf Parameters: }]\par \begin{description} \item[ {\em line}] pointer. \end{description} \end{Desc} \index{ScriptCommand@{Script\-Command}!Check@{Check}} \index{Check@{Check}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}char $\ast$ Script\-Command::Check (char $\ast$ {\em command}, {\bf scriptline\_\-t} $\ast$ {\em line}, {\bf Script\-Image} $\ast$ {\em img})\hspace{0.3cm}{\tt [protected]}}\label{class_scriptcommand_b1} Check keyword syntax. \begin{Desc} \item[{\bf Returns: }]\par syntax error string or NULL. \end{Desc} \begin{Desc} \item[{\bf Parameters: }]\par \begin{description} \item[ {\em name}] of keyword to check. \item[ {\em hook}] to compiler source. \end{description} \end{Desc} \index{ScriptCommand@{Script\-Command}!Load@{Load}} \index{Load@{Load}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Script\-Command::Load ({\bf SCRKEYWORDS} $\ast$ {\em keywords})\hspace{0.3cm}{\tt [protected]}}\label{class_scriptcommand_b16} Load a set of keywords into the system keyword table. This provides a convenient method of initializing and adding to the keyword indexes.\begin{Desc} \item[{\bf Parameters: }]\par \begin{description} \item[ {\em keyword}] entries to load. \end{description} \end{Desc} \index{ScriptCommand@{Script\-Command}!Trap@{Trap}} \index{Trap@{Trap}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Script\-Command::Trap (const char $\ast$ {\em name})\hspace{0.3cm}{\tt [protected]}}\label{class_scriptcommand_b17} 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.\begin{Desc} \item[{\bf Parameters: }]\par \begin{description} \item[ {\em requested}] trap name. \end{description} \end{Desc} \begin{Desc} \item[{\bf Returns: }]\par assigned id number for the trap. \end{Desc} \index{ScriptCommand@{Script\-Command}!chkHasArgs@{chkHasArgs}} \index{chkHasArgs@{chkHasArgs}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}char $\ast$ Script\-Command::chk\-Has\-Args ({\bf scriptline\_\-t} $\ast$ {\em line}, {\bf Script\-Image} $\ast$ {\em img})\hspace{0.3cm}{\tt [protected]}}\label{class_scriptcommand_b15} Script compiler syntax check for commands that require one or more arguments to be present. \begin{Desc} \item[{\bf Returns: }]\par syntax error message string or NULL. \end{Desc} \begin{Desc} \item[{\bf Parameters: }]\par \begin{description} \item[ {\em line}] statement. \end{description} \end{Desc} \index{ScriptCommand@{Script\-Command}!chkHasList@{chkHasList}} \index{chkHasList@{chkHasList}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}char $\ast$ Script\-Command::chk\-Has\-List ({\bf scriptline\_\-t} $\ast$ {\em line}, {\bf Script\-Image} $\ast$ {\em img})\hspace{0.3cm}{\tt [protected]}}\label{class_scriptcommand_b13} Script compiler syntax check for assignment statements such as "set", "for", etc. \begin{Desc} \item[{\bf Returns: }]\par syntax error message string or NULL. \end{Desc} \begin{Desc} \item[{\bf Parameters: }]\par \begin{description} \item[ {\em line}] statement. \end{description} \end{Desc} \index{ScriptCommand@{Script\-Command}!chkHasModify@{chkHasModify}} \index{chkHasModify@{chkHasModify}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}char $\ast$ Script\-Command::chk\-Has\-Modify ({\bf scriptline\_\-t} $\ast$ {\em line}, {\bf Script\-Image} $\ast$ {\em img})\hspace{0.3cm}{\tt [protected]}}\label{class_scriptcommand_b11} A check used by "inc" and "dec". \begin{Desc} \item[{\bf Returns: }]\par synxtax error message string or NULL. \end{Desc} \begin{Desc} \item[{\bf Parameters: }]\par \begin{description} \item[ {\em line}] statement. \end{description} \end{Desc} \index{ScriptCommand@{Script\-Command}!chkHasVars@{chkHasVars}} \index{chkHasVars@{chkHasVars}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}char $\ast$ Script\-Command::chk\-Has\-Vars ({\bf scriptline\_\-t} $\ast$ {\em line}, {\bf Script\-Image} $\ast$ {\em img})\hspace{0.3cm}{\tt [protected]}}\label{class_scriptcommand_b12} Script compiler syntax check for certain variable using statements such as "clear". Assumes list of valid variable arguments. \index{ScriptCommand@{Script\-Command}!chkIgnore@{chkIgnore}} \index{chkIgnore@{chkIgnore}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}char $\ast$ Script\-Command::chk\-Ignore ({\bf scriptline\_\-t} $\ast$ {\em line}, {\bf Script\-Image} $\ast$ {\em img})\hspace{0.3cm}{\tt [protected]}}\label{class_scriptcommand_b8} Default compiler syntax to accept any syntax. \index{ScriptCommand@{Script\-Command}!chkModule@{chkModule}} \index{chkModule@{chkModule}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}char $\ast$ Script\-Command::chk\-Module ({\bf scriptline\_\-t} $\ast$ {\em line}, {\bf Script\-Image} $\ast$ {\em img})\hspace{0.3cm}{\tt [protected]}}\label{class_scriptcommand_b9} Module based script checker. \index{ScriptCommand@{Script\-Command}!chkNoArgs@{chkNoArgs}} \index{chkNoArgs@{chkNoArgs}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}char $\ast$ Script\-Command::chk\-No\-Args ({\bf scriptline\_\-t} $\ast$ {\em line}, {\bf Script\-Image} $\ast$ {\em img})\hspace{0.3cm}{\tt [protected]}}\label{class_scriptcommand_b14} Script compiler syntax check for commands that require no arguments to be present. \begin{Desc} \item[{\bf Returns: }]\par syntax error message string or NULL. \end{Desc} \begin{Desc} \item[{\bf Parameters: }]\par \begin{description} \item[ {\em line}] statement. \end{description} \end{Desc} \index{ScriptCommand@{Script\-Command}!chkUse@{chkUse}} \index{chkUse@{chkUse}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}char $\ast$ Script\-Command::chk\-Use ({\bf scriptline\_\-t} $\ast$ {\em line}, {\bf Script\-Image} $\ast$ {\em img})\hspace{0.3cm}{\tt [protected]}}\label{class_scriptcommand_b10} Performs {\bf DSO} {\rm (p.\,\pageref{class_dso})} load phase for USE modules. \index{ScriptCommand@{Script\-Command}!getCount@{getCount}} \index{getCount@{getCount}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Script\-Command::get\-Count (void)\hspace{0.3cm}{\tt [inline, protected]}}\label{class_scriptcommand_b18} Get count of active traps. \begin{Desc} \item[{\bf Returns: }]\par count of active trap identifiers. \end{Desc} \index{ScriptCommand@{Script\-Command}!getHandler@{getHandler}} \index{getHandler@{getHandler}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf scriptmethod\_\-t} Script\-Command::get\-Handler (const char $\ast$ {\em keyword})\hspace{0.3cm}{\tt [protected]}}\label{class_scriptcommand_b0} Get the method handler associated with a given keyword. This is used by {\bf Script\-Image} {\rm (p.\,\pageref{class_scriptimage})} when compiling.\begin{Desc} \item[{\bf Parameters: }]\par \begin{description} \item[ {\em keyword}] to search for. \end{description} \end{Desc} \begin{Desc} \item[{\bf Returns: }]\par method handler to execute for this keyword. \end{Desc} \index{ScriptCommand@{Script\-Command}!getTrapDefault@{getTrapDefault}} \index{getTrapDefault@{getTrapDefault}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned long Script\-Command::get\-Trap\-Default (void)\hspace{0.3cm}{\tt [inline, protected, virtual]}}\label{class_scriptcommand_b3} Get the mask bits for the default script. \begin{Desc} \item[{\bf Returns: }]\par trap mask to use. \end{Desc} \index{ScriptCommand@{Script\-Command}!getTrapHandler@{getTrapHandler}} \index{getTrapHandler@{getTrapHandler}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned long Script\-Command::get\-Trap\-Handler ({\bf scriptname\_\-t} $\ast$ {\em scr})\hspace{0.3cm}{\tt [inline, protected, virtual]}}\label{class_scriptcommand_b4} Get the mask bits for a trap "handler". \begin{Desc} \item[{\bf Returns: }]\par trap mask to use. \end{Desc} \index{ScriptCommand@{Script\-Command}!getTrapId@{getTrapId}} \index{getTrapId@{getTrapId}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned Script\-Command::get\-Trap\-Id (const char $\ast$ {\em trap})\hspace{0.3cm}{\tt [protected, virtual]}}\label{class_scriptcommand_b2} Get the trap id number associated with a trap name. \begin{Desc} \item[{\bf Returns: }]\par trap id number, 0 (exit) if invalid. \end{Desc} \begin{Desc} \item[{\bf Parameters: }]\par \begin{description} \item[ {\em name}] of trap identifier. \end{description} \end{Desc} \index{ScriptCommand@{Script\-Command}!getTrapMask@{getTrapMask}} \index{getTrapMask@{getTrapMask}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned long Script\-Command::get\-Trap\-Mask (const char $\ast$ {\em trapname})\hspace{0.3cm}{\tt [protected, virtual]}}\label{class_scriptcommand_b7} A helper method for the compiler used specifically for "$^\wedge$" trap subsection requests. These will occasionally carry different attribute settings.\begin{Desc} \item[{\bf Parameters: }]\par \begin{description} \item[ {\em name}] of trap identifier. \end{description} \end{Desc} \begin{Desc} \item[{\bf Returns: }]\par bit shifted mask or 0 if invalid. \end{Desc} \index{ScriptCommand@{Script\-Command}!getTrapMask@{getTrapMask}} \index{getTrapMask@{getTrapMask}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned long Script\-Command::get\-Trap\-Mask (unsigned {\em id})\hspace{0.3cm}{\tt [protected, virtual]}}\label{class_scriptcommand_b5} Get a trap mask for a given identifer. This is a virtual since some derived handlers may manipulate mask bits. \begin{Desc} \item[{\bf Returns: }]\par signal mask. \end{Desc} \begin{Desc} \item[{\bf Parameters: }]\par \begin{description} \item[ {\em identifier.}] \end{description} \end{Desc} \index{ScriptCommand@{Script\-Command}!getTrapModifier@{getTrapModifier}} \index{getTrapModifier@{getTrapModifier}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned long Script\-Command::get\-Trap\-Modifier (const char $\ast$ {\em trapname})\hspace{0.3cm}{\tt [inline, protected, virtual]}}\label{class_scriptcommand_b6} 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.\begin{Desc} \item[{\bf Parameters: }]\par \begin{description} \item[ {\em name}] of trap identifier. \end{description} \end{Desc} \begin{Desc} \item[{\bf Returns: }]\par bit shifted mask or 0 if invalid. \end{Desc} \subsection{Friends And Related Function Documentation} \index{ScriptCommand@{Script\-Command}!ScriptImage@{ScriptImage}} \index{ScriptImage@{ScriptImage}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}class Script\-Image\hspace{0.3cm}{\tt [friend]}}\label{class_scriptcommand_l0} \index{ScriptCommand@{Script\-Command}!ScriptInterp@{ScriptInterp}} \index{ScriptInterp@{ScriptInterp}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}class Script\-Interp\hspace{0.3cm}{\tt [friend]}}\label{class_scriptcommand_l1} \index{ScriptCommand@{Script\-Command}!ScriptModule@{ScriptModule}} \index{ScriptModule@{ScriptModule}!ScriptCommand@{Script\-Command}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}class Script\-Module\hspace{0.3cm}{\tt [friend]}}\label{class_scriptcommand_l2} The documentation for this class was generated from the following file:\begin{CompactItemize} \item {\bf script.h}\end{CompactItemize}