\section{Anim\-Frame  Class Reference}
\label{class_AnimFrame}\index{AnimFrame@{Anim\-Frame}}
{\tt \#include $<$jd\_\-anim\_\-frame.h$>$}

Inheritance diagram for Anim\-Frame\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=56pt]{class_AnimFrame_inherit_graph}
\end{center}
\end{figure}
Collaboration diagram for Anim\-Frame:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=375pt]{class_AnimFrame_coll_graph}
\end{center}
\end{figure}
\subsection*{Public Methods}
\begin{CompactItemize}
\item 
{\bf Anim\-Frame} (const Anim\-Frame \&ca)
\item 
{\bf Anim\-Frame} ({\bf Constraint\-Manager} \&{\bf CM}, {\bf Dyn\-String} val="")
\item 
{\bf $\sim$Anim\-Frame} ()
\item 
int {\bf run} ()
\item 
int {\bf run} (ostream $\ast$os)
\item 
void {\bf Set\_\-Output\_\-Stream} ({\bf Dyn\-String} val)
\end{CompactItemize}
\subsection*{Public Attributes}
\begin{CompactItemize}
\item 
{\bf Dyn\-String} {\bf comment}
\end{CompactItemize}
\subsection*{Static Public Attributes}
\begin{CompactItemize}
\item 
bool {\bf Enabled} = false
\end{CompactItemize}
\subsection*{Private Attributes}
\begin{CompactItemize}
\item 
bool {\bf delete\-Stream}
\item 
char$\ast$ {\bf name}
\item 
int$\ast$ {\bf colors}
\item 
ostream$\ast$ {\bf Output\_\-Stream}
\end{CompactItemize}
\subsection*{Static Private Attributes}
\begin{CompactItemize}
\item 
int {\bf Frame\-Num} = 0
\end{CompactItemize}


\subsection{Detailed Description}
//////////////////////////////////////////////////////////

File: {\bf jd\_\-anim\_\-frame.h}

Created by: Jon Dugan

Writes a single animation frmae.

////////////////////////////////////////////////////////// 



Definition at line 25 of file jd\_\-anim\_\-frame.h.

\subsection{Constructor \& Destructor Documentation}
\index{AnimFrame@{Anim\-Frame}!AnimFrame@{AnimFrame}}
\index{AnimFrame@{AnimFrame}!AnimFrame@{Anim\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Anim\-Frame::Anim\-Frame (const Anim\-Frame \& {\em ca})}\label{class_AnimFrame_a0}




Definition at line 5 of file jd\_\-anim\_\-frame.C.\footnotesize\begin{verbatim}00006   : SatisfyMolecule(*(ca.CM))
00007 {
00008   // FIX fix copy constructor
00009   DIE("anim frame copy constructor called");
00010 \end{verbatim}\normalsize 
\index{AnimFrame@{Anim\-Frame}!AnimFrame@{AnimFrame}}
\index{AnimFrame@{AnimFrame}!AnimFrame@{Anim\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Anim\-Frame::Anim\-Frame ({\bf Constraint\-Manager} \& {\em cm\_\-in}, {\bf Dyn\-String} {\em val} = "")}\label{class_AnimFrame_a1}




Definition at line 14 of file jd\_\-anim\_\-frame.C.\footnotesize\begin{verbatim}00015   : SatisfyMolecule(cm_in)
00016 {
00017   //  ostream *Output_Stream = &cout; // default
00018   Set_Output_Stream(val);
00019   int atoms =  cm_in.numAtoms();
00020   colors = new int[atoms];
00021   comment = "--";
00022 \end{verbatim}\normalsize 
\index{AnimFrame@{Anim\-Frame}!~AnimFrame@{$\sim$AnimFrame}}
\index{~AnimFrame@{$\sim$AnimFrame}!AnimFrame@{Anim\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Anim\-Frame::$\sim$Anim\-Frame ()}\label{class_AnimFrame_a2}




Definition at line 26 of file jd\_\-anim\_\-frame.C.\footnotesize\begin{verbatim}00026                      { 
00027 
00028   delete [] colors;
00029   Output_Stream->flush();
00030   
00031   //  if (Output_Stream != &cerr && Output_Stream != &cout)
00032   if (deleteStream)
00033     delete Output_Stream;
00034   
00035 \end{verbatim}\normalsize 


\subsection{Member Function Documentation}
\index{AnimFrame@{Anim\-Frame}!Set_Output_Stream@{Set\_\-Output\_\-Stream}}
\index{Set_Output_Stream@{Set\_\-Output\_\-Stream}!AnimFrame@{Anim\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Anim\-Frame::Set\_\-Output\_\-Stream ({\bf Dyn\-String} {\em val})}\label{class_AnimFrame_a5}




Definition at line 37 of file jd\_\-anim\_\-frame.C.

Referenced by Anim\-Frame().\footnotesize\begin{verbatim}00037                                               {
00038   deleteStream = false;
00039   if (val == DynString("cerr") ||(val.Length() == 0))
00040     Output_Stream = &cerr;
00041   else if (val == DynString("cout"))
00042     Output_Stream = &cout;
00043   else {
00044     if (val[0] == '-'){
00045       cerr << "Confused by filename " << val << " . Try -help option." << endl;
00046       DIE("");
00047     }
00048     deleteStream = true;      
00049     char * s = &(val[0]);  // ACK  not good, but it doesn't leak. -jd
00050     Output_Stream = new ofstream(s);              
00051   }
00052 \end{verbatim}\normalsize 
\index{AnimFrame@{Anim\-Frame}!run@{run}}
\index{run@{run}!AnimFrame@{Anim\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Anim\-Frame::run (ostream $\ast$ {\em os})}\label{class_AnimFrame_a4}


\index{AnimFrame@{Anim\-Frame}!run@{run}}
\index{run@{run}!AnimFrame@{Anim\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Anim\-Frame::run ()\hspace{0.3cm}{\tt  [virtual]}}\label{class_AnimFrame_a3}


Execute this process. Returns the exit status of the process (0 is success, non-zero is error). 

Reimplemented from {\bf Process} {\rm (p.\,\pageref{class_Process_a1})}.

Definition at line 68 of file jd\_\-anim\_\-frame.C.

Referenced by jd\-Rand\_\-Eval::run(), jd\-Iterator::run(), jd\-Err\_\-Eval::run(), and Atom\-Buildup::run().\footnotesize\begin{verbatim}00068                    {
00069 #ifdef JOB_VERBOSE
00070   cerr << "Start: \tAnimFrame::run()" << endl;
00071 #endif
00072 
00073   if (AnimFrame::Enabled){
00074     jVector StressVals = CM->getStressList();
00075     
00076     for (int i =0; i < StressVals.Length(); i++){
00077       int color =  (int) StressVals[i];
00078       if (color > 9) color = 9;
00079       if (color < 0) color = 0;
00080       colors[i] = color;
00081     }
00082     AnimFrame::FrameNum++;
00083     CM->getMolecule().writeXmolData(*Output_Stream, colors, comment);
00084   }
00085 \end{verbatim}\normalsize 


\subsection{Member Data Documentation}
\index{AnimFrame@{Anim\-Frame}!Enabled@{Enabled}}
\index{Enabled@{Enabled}!AnimFrame@{Anim\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Anim\-Frame::Enabled = false\hspace{0.3cm}{\tt  [static]}}\label{class_AnimFrame_p0}




Definition at line 37 of file globals.C.\index{AnimFrame@{Anim\-Frame}!FrameNum@{FrameNum}}
\index{FrameNum@{FrameNum}!AnimFrame@{Anim\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Anim\-Frame::Frame\-Num = 0\hspace{0.3cm}{\tt  [static, private]}}\label{class_AnimFrame_r0}




Definition at line 3 of file jd\_\-anim\_\-frame.C.\index{AnimFrame@{Anim\-Frame}!Output_Stream@{Output\_\-Stream}}
\index{Output_Stream@{Output\_\-Stream}!AnimFrame@{Anim\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}ostream $\ast$ Anim\-Frame::Output\_\-Stream\hspace{0.3cm}{\tt  [private]}}\label{class_AnimFrame_o3}




Definition at line 59 of file jd\_\-anim\_\-frame.h.\index{AnimFrame@{Anim\-Frame}!colors@{colors}}
\index{colors@{colors}!AnimFrame@{Anim\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int $\ast$ Anim\-Frame::colors\hspace{0.3cm}{\tt  [private]}}\label{class_AnimFrame_o2}




Definition at line 58 of file jd\_\-anim\_\-frame.h.\index{AnimFrame@{Anim\-Frame}!comment@{comment}}
\index{comment@{comment}!AnimFrame@{Anim\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Dyn\-String} Anim\-Frame::comment}\label{class_AnimFrame_m0}




Definition at line 46 of file jd\_\-anim\_\-frame.h.\index{AnimFrame@{Anim\-Frame}!deleteStream@{deleteStream}}
\index{deleteStream@{deleteStream}!AnimFrame@{Anim\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Anim\-Frame::delete\-Stream\hspace{0.3cm}{\tt  [private]}}\label{class_AnimFrame_o0}




Definition at line 55 of file jd\_\-anim\_\-frame.h.\index{AnimFrame@{Anim\-Frame}!name@{name}}
\index{name@{name}!AnimFrame@{Anim\-Frame}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char $\ast$ Anim\-Frame::name\hspace{0.3cm}{\tt  [private]}}\label{class_AnimFrame_o1}




Definition at line 56 of file jd\_\-anim\_\-frame.h.

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
{\bf jd\_\-anim\_\-frame.h}\item 
{\bf globals.C}\item 
{\bf jd\_\-anim\_\-frame.C}\end{CompactItemize}
