%File ~/OOP/analysis/algorithm/SolutionAlgorithm.tex
%What: "@(#) SolutionAlgorithm.tex, revA"

\noindent {\bf Files}   \\
\indent \#include $<\tilde{ }$/analysis/algorithm/SolutionAlgorithm.h$>$  \\

\noindent {\bf Class Declaration}  \\
\indent class SolutionAlgorithm: public MovableObject  \\

\noindent {\bf Class Hierarchy} \\
\indent MovableObject \\
\indent\indent {\bf SolutionAlgorithm} \\

\noindent {\bf Description} \\ 
\indent The SolutionAlgorithm class is an abstract base class. Its purpose
is to define the interface common among all its subclasses. A
SolutionAlgorithm object performs the steps in the analysis by specifying
the sequence of operations to be performed by members in the analysis
aggregation.\\


\noindent {\bf Class Interface} \\ 
\indent // Constructor \\ 
\indent {\em SolutionAlgorithm(int classTag);}\\  \\
\indent // Destructor \\
\indent {\em virtual~ $\tilde{}$SolutionAlgorithm();}\\  \\
\indent // Public Methods  \\
\indent {\em virtual int domainChanged(void); } \\
\indent {\em virtual  int  addRecorder(Recorder \&theRecorder);}\\	
\indent {\em virtual int record(int track); } \\
\indent {\em virtual int playback(int track); } \\


\noindent {\bf Constructor} \\ 
\indent {\em SolutionAlgorithm(int classTag);}\\ 
The integer {\em classTag} is passed to the MovableObject classes
constructor. \\

\noindent {\bf Destructor} \\
\indent {\em virtual~ $\tilde{}$SolutionAlgorithm();}\\ 
Invokes the destructor on any recorder object added to the
SolutionAlgorithm and releases memory used to hold pointers to the
recorder objects. \\


\noindent {\bf Public Methods}  \\
\indent {\em virtual int domainChanged(void); } \\
Is called by the Analysis if the domain changes. It is called after
{\em domainChange()} has been called on the ConstraintHandler,
DOF\_Numberer and the Integrator and after {\em setSize()} has been
called on the SystemOfEqn object. For base class nothing is done and
$0$ is returned. The subclasses can provide their own implementation
of this method if anything needs to be done, e.g. memory allocation,
To return $0$ if successful, a negative number if not. \\


\indent {\em  virtual int  addRecorder(Recorder \&theRecorder);}\\
To add a recorder object {\em theRecorder} to the
SolutionAlgorithm. returns $0$ if successfull, a warning message and a
$-1$ is returned if not enough mempry is available. \\

\indent {\em virtual int record(int track); } \\
To invoke {\em record(track)} on any Recorder objects which have been added to the
SolutionAlgorithm. \\

\indent {\em virtual int playback(int track); } \\
To invoke {\em playback(track)} on any Recorder objects which have been added to the
SolutionAlgorithm. \\






