\section{ost::Script\-Image Class Reference} \label{classost_1_1_script_image}\index{ost::ScriptImage@{ost::Script\-Image}} A derivable class to hold compiled script images for active processes. Script compiler image set. {\tt \#include $<$script.h$>$} Inheritance diagram for ost::Script\-Image::\begin{figure}[H] \begin{center} \leavevmode \includegraphics[height=2cm]{classost_1_1_script_image} \end{center} \end{figure} \subsection*{Public Methods} \begin{CompactItemize} \item virtual {\bf scriptname\_\-t} $\ast$ {\bf get\-Script} (const char $\ast$name) \begin{CompactList}\small\item\em Fetch named script.\item\end{CompactList}\item virtual {\bf scriptname\_\-t} $\ast$ {\bf dup\-Script} (const char $\ast$name, const char $\ast$target) \begin{CompactList}\small\item\em Duplicate script if needed.\item\end{CompactList}\item unsigned {\bf Gather} (const char $\ast$suffix, {\bf scriptname\_\-t} $\ast$$\ast$array, unsigned size) \begin{CompactList}\small\item\em Fetch list of relational scripts.\item\end{CompactList}\item std::istream $\ast$ {\bf get\-Source} (void) \begin{CompactList}\small\item\em Used by embedded interpreters to fetch script from the current source file.\item\end{CompactList}\end{CompactItemize} \subsection*{Protected Methods} \begin{CompactItemize} \item char $\ast$ {\bf get\-Token} (void) \item {\bf scriptmethod\_\-t} {\bf get\-Handler} (const char $\ast$keyword) \begin{CompactList}\small\item\em Get the interpreter method pointer for a given keyword.\item\end{CompactList}\item {\bf Script\-Image} ({\bf Script\-Command} $\ast$cmdset) \begin{CompactList}\small\item\em Construct a new working image.\item\end{CompactList}\item void {\bf Purge} (void) \begin{CompactList}\small\item\em Purge and reload the script image workspace.\item\end{CompactList}\item {\bf scriptname\_\-t} $\ast$ {\bf Include} (const char $\ast$scrfile) \begin{CompactList}\small\item\em A method to invoke the script compiler to include a script only if it has not been included already.\item\end{CompactList}\item int {\bf Compile} (const char $\ast$scrfile) \begin{CompactList}\small\item\em The script compiler itself.\item\end{CompactList}\item int {\bf Compile} (const char $\ast$scrfile, char $\ast$name) \begin{CompactList}\small\item\em Compile a script from disk and give it a different internal \char`\"{}name\char`\"{} as passed.\item\end{CompactList}\item int {\bf Compile} (std::istream $\ast$str, char $\ast$name, const char $\ast$scrname=NULL) \begin{CompactList}\small\item\em Compile an open stream object into a script.\item\end{CompactList}\item void {\bf Commit} (void) \begin{CompactList}\small\item\em Used in the derived constructor to \char`\"{}commit\char`\"{} the current image for new processes.\item\end{CompactList}\end{CompactItemize} \subsection*{Protected Attributes} \begin{CompactItemize} \item std::ifstream {\bf scr\-Source} \item std::istream $\ast$ {\bf scr\-Stream} \item {\bf Script\-Command} $\ast$ {\bf cmds} \item int {\bf refcount} \item {\bf scriptname\_\-t} $\ast$ {\bf index} [SCRIPT\_\-INDEX\_\-SIZE] \item char {\bf buffer} [512] \item char $\ast$ {\bf bp} \item bool {\bf quote} \item {\bf Mutex} {\bf duplock} \end{CompactItemize} \subsection*{Friends} \begin{CompactItemize} \item class {\bf Script\-Interp} \item class {\bf Script\-Module} \end{CompactItemize} \subsection{Detailed Description} A derivable class to hold compiled script images for active processes. Script compiler image set. 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. \begin{Desc} \item[Author: ]\par David Sugar $<${\tt dyfet@ostel.com}$>$. \end{Desc} \subsection{Constructor \& Destructor Documentation} \index{ost::ScriptImage@{ost::Script\-Image}!ScriptImage@{ScriptImage}} \index{ScriptImage@{ScriptImage}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}ost::Script\-Image::Script\-Image ({\bf Script\-Command} $\ast$ {\em cmdset})\hspace{0.3cm}{\tt [protected]}}\label{classost_1_1_script_image_b2} Construct a new working image. This must be derived to an application specific compiler that can scan directories and invoke the compiler as needed.\begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em cmdset}]of keyword table object used. \end{description} \end{Desc} \subsection{Member Function Documentation} \index{ost::ScriptImage@{ost::Script\-Image}!Commit@{Commit}} \index{Commit@{Commit}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ost::Script\-Image::Commit (void)\hspace{0.3cm}{\tt [protected]}}\label{classost_1_1_script_image_b8} Used in the derived constructor to \char`\"{}commit\char`\"{} the current image for new processes. This is usually the last statement in the derived constructor. \index{ost::ScriptImage@{ost::Script\-Image}!Compile@{Compile}} \index{Compile@{Compile}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int ost::Script\-Image::Compile (std::istream $\ast$ {\em str}, char $\ast$ {\em name}, const char $\ast$ {\em scrname} = NULL)\hspace{0.3cm}{\tt [protected]}}\label{classost_1_1_script_image_b7} Compile an open stream object into a script. \begin{Desc} \item[Returns: ]\par lines of script compiled. \end{Desc} \begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em stream}]object to use. \item[{\em name}]of script save under. \end{description} \end{Desc} \index{ost::ScriptImage@{ost::Script\-Image}!Compile@{Compile}} \index{Compile@{Compile}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int ost::Script\-Image::Compile (const char $\ast$ {\em scrfile}, char $\ast$ {\em name})\hspace{0.3cm}{\tt [protected]}}\label{classost_1_1_script_image_b6} Compile a script from disk and give it a different internal \char`\"{}name\char`\"{} as passed. \begin{Desc} \item[Returns: ]\par lines of script compiled. \end{Desc} \begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em name}]of script file to compile. \item[{\em name}]of script to save under. \item[{\em test}]if script already loaded. \end{description} \end{Desc} \index{ost::ScriptImage@{ost::Script\-Image}!Compile@{Compile}} \index{Compile@{Compile}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int ost::Script\-Image::Compile (const char $\ast$ {\em scrfile})\hspace{0.3cm}{\tt [protected]}}\label{classost_1_1_script_image_b5} The script compiler itself. This linearly compiles a Bayonne script file that is specified. Normally used along with a dir scanner in the constructor. \begin{Desc} \item[Returns: ]\par lines of script compiled. \end{Desc} \begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em name}]of script file to compile. \end{description} \end{Desc} \index{ost::ScriptImage@{ost::Script\-Image}!Gather@{Gather}} \index{Gather@{Gather}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned ost::Script\-Image::Gather (const char $\ast$ {\em suffix}, {\bf scriptname\_\-t} $\ast$$\ast$ {\em array}, unsigned {\em size})}\label{classost_1_1_script_image_a2} Fetch list of relational scripts. \begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em suffix.}]\item[{\em index.}]\item[{\em max}]entries. \end{description} \end{Desc} \begin{Desc} \item[Returns: ]\par count of entries found. \end{Desc} \index{ost::ScriptImage@{ost::Script\-Image}!Include@{Include}} \index{Include@{Include}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf scriptname\_\-t}$\ast$ ost::Script\-Image::Include (const char $\ast$ {\em scrfile})\hspace{0.3cm}{\tt [protected]}}\label{classost_1_1_script_image_b4} A method to invoke the script compiler to include a script only if it has not been included already. \begin{Desc} \item[Returns: ]\par named script object. \end{Desc} \begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em name}]of script file to compile. \end{description} \end{Desc} \index{ost::ScriptImage@{ost::Script\-Image}!Purge@{Purge}} \index{Purge@{Purge}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ost::Script\-Image::Purge (void)\hspace{0.3cm}{\tt [protected]}}\label{classost_1_1_script_image_b3} Purge and reload the script image workspace. \index{ost::ScriptImage@{ost::Script\-Image}!dupScript@{dupScript}} \index{dupScript@{dupScript}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf scriptname\_\-t}$\ast$ ost::Script\-Image::dup\-Script (const char $\ast$ {\em name}, const char $\ast$ {\em target})\hspace{0.3cm}{\tt [virtual]}}\label{classost_1_1_script_image_a1} Duplicate script if needed. \begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em script}]name to dup. \item[{\em target}]name to dup as. \end{description} \end{Desc} \begin{Desc} \item[Returns: ]\par script or NULL. \end{Desc} \index{ost::ScriptImage@{ost::Script\-Image}!getHandler@{getHandler}} \index{getHandler@{getHandler}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf scriptmethod\_\-t} ost::Script\-Image::get\-Handler (const char $\ast$ {\em keyword})\hspace{0.3cm}{\tt [inline, protected]}}\label{classost_1_1_script_image_b1} Get the interpreter method pointer for a given keyword. \begin{Desc} \item[Returns: ]\par method handler. \end{Desc} \begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em keyword}]to search. \end{description} \end{Desc} \index{ost::ScriptImage@{ost::Script\-Image}!getScript@{getScript}} \index{getScript@{getScript}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf scriptname\_\-t}$\ast$ ost::Script\-Image::get\-Script (const char $\ast$ {\em name})\hspace{0.3cm}{\tt [virtual]}}\label{classost_1_1_script_image_a0} Fetch named script. \begin{Desc} \item[Parameters: ]\par \begin{description} \item[{\em script}]name to find. \end{description} \end{Desc} \begin{Desc} \item[Returns: ]\par script or NULL. \end{Desc} \index{ost::ScriptImage@{ost::Script\-Image}!getSource@{getSource}} \index{getSource@{getSource}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::istream$\ast$ ost::Script\-Image::get\-Source (void)\hspace{0.3cm}{\tt [inline]}}\label{classost_1_1_script_image_a3} Used by embedded interpreters to fetch script from the current source file. \begin{Desc} \item[Returns: ]\par reference to source file stream. \end{Desc} \index{ost::ScriptImage@{ost::Script\-Image}!getToken@{getToken}} \index{getToken@{getToken}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ ost::Script\-Image::get\-Token (void)\hspace{0.3cm}{\tt [protected]}}\label{classost_1_1_script_image_b0} \subsection{Friends And Related Function Documentation} \index{ost::ScriptImage@{ost::Script\-Image}!ScriptInterp@{ScriptInterp}} \index{ScriptInterp@{ScriptInterp}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}friend class Script\-Interp\hspace{0.3cm}{\tt [friend]}}\label{classost_1_1_script_image_l0} \index{ost::ScriptImage@{ost::Script\-Image}!ScriptModule@{ScriptModule}} \index{ScriptModule@{ScriptModule}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}friend class Script\-Module\hspace{0.3cm}{\tt [friend]}}\label{classost_1_1_script_image_l1} \subsection{Member Data Documentation} \index{ost::ScriptImage@{ost::Script\-Image}!bp@{bp}} \index{bp@{bp}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ ost::Script\-Image::bp\hspace{0.3cm}{\tt [protected]}}\label{classost_1_1_script_image_n6} \index{ost::ScriptImage@{ost::Script\-Image}!buffer@{buffer}} \index{buffer@{buffer}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}char ost::Script\-Image::buffer[512]\hspace{0.3cm}{\tt [protected]}}\label{classost_1_1_script_image_n5} \index{ost::ScriptImage@{ost::Script\-Image}!cmds@{cmds}} \index{cmds@{cmds}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Script\-Command}$\ast$ ost::Script\-Image::cmds\hspace{0.3cm}{\tt [protected]}}\label{classost_1_1_script_image_n2} \index{ost::ScriptImage@{ost::Script\-Image}!duplock@{duplock}} \index{duplock@{duplock}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Mutex} ost::Script\-Image::duplock\hspace{0.3cm}{\tt [protected]}}\label{classost_1_1_script_image_n8} \index{ost::ScriptImage@{ost::Script\-Image}!index@{index}} \index{index@{index}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf scriptname\_\-t}$\ast$ ost::Script\-Image::index[SCRIPT\_\-INDEX\_\-SIZE]\hspace{0.3cm}{\tt [protected]}}\label{classost_1_1_script_image_n4} \index{ost::ScriptImage@{ost::Script\-Image}!quote@{quote}} \index{quote@{quote}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool ost::Script\-Image::quote\hspace{0.3cm}{\tt [protected]}}\label{classost_1_1_script_image_n7} \index{ost::ScriptImage@{ost::Script\-Image}!refcount@{refcount}} \index{refcount@{refcount}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int ost::Script\-Image::refcount\hspace{0.3cm}{\tt [protected]}}\label{classost_1_1_script_image_n3} \index{ost::ScriptImage@{ost::Script\-Image}!scrSource@{scrSource}} \index{scrSource@{scrSource}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::ifstream ost::Script\-Image::scr\-Source\hspace{0.3cm}{\tt [protected]}}\label{classost_1_1_script_image_n0} \index{ost::ScriptImage@{ost::Script\-Image}!scrStream@{scrStream}} \index{scrStream@{scrStream}!ost::ScriptImage@{ost::Script\-Image}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::istream$\ast$ ost::Script\-Image::scr\-Stream\hspace{0.3cm}{\tt [protected]}}\label{classost_1_1_script_image_n1} The documentation for this class was generated from the following file:\begin{CompactItemize} \item {\bf script.h}\end{CompactItemize}