--- trunk/tengDissertation/Appendix.tex	2006/06/08 20:05:53	2827
+++ trunk/tengDissertation/Appendix.tex	2006/06/08 21:02:53	2831
@@ -179,36 +179,25 @@ class IntegratorFactory {
   public:
     typedef std::map<string, IntegratorCreator*> CreatorMapType;
 
-    bool registerIntegrator(IntegratorCreator* creator);
+    bool registerIntegrator(IntegratorCreator* creator) {
+      return creatorMap_.insert(creator->getIdent(), creator).second;
+    }
 
-    Integrator* createIntegrator(const string& id, SimInfo* info);
+    Integrator* createIntegrator(const string& id, SimInfo* info) {
+      Integrator* result = NULL;
+      CreatorMapType::iterator i = creatorMap_.find(id);
+      if (i != creatorMap_.end()) {
+        result = (i->second)->create(info);
+      }
+      return result;
+    }
 
   private:
     CreatorMapType creatorMap_;
 };
-
-\end{lstlisting}
-
-\begin{lstlisting}[float,caption={[The implementation of Factory pattern (II)].},label={appendixScheme:factoryDeclarationImplementation}]
-
-bool IntegratorFactory::unregisterIntegrator(const string& id) {
-  return creatorMap_.erase(id) == 1;
-}
-
-Integrator* IntegratorFactory::createIntegrator(const string& id,
-                                                SimInfo* info) {
-  CreatorMapType::iterator i = creatorMap_.find(id);
-  if (i != creatorMap_.end()) {
-    return (i->second)->create(info);
-  } else {
-    return NULL;
-  }
-}
-
 \end{lstlisting}
+\begin{lstlisting}[float,caption={[The implementation of Factory pattern (III)]Souce code of creator classes.},label={appendixScheme:integratorCreator}]
 
-\begin{lstlisting}[float,caption={[The implementation of Factory pattern (III)].},label={appendixScheme:integratorCreator}]
-
 class IntegratorCreator {
   public:
     IntegratorCreator(const string& ident) : ident_(ident) {}
@@ -290,18 +279,26 @@ class RigidBody: public StuntDouble {
 };
 
 \end{lstlisting}
+
 \section{\label{appendixSection:concepts}Concepts}
 
 OOPSE manipulates both traditional atoms as well as some objects
 that {\it behave like atoms}.  These objects can be rigid
 collections of atoms or atoms which have orientational degrees of
-freedom.  Here is a diagram of the class heirarchy:
-
+freedom.  A diagram of the class heirarchy is illustrated in
+Fig.~\ref{oopseFig:heirarchy}. Every Molecule, Atom and
+DirectionalAtom in {\sc OOPSE} have their own names which are
+specified in the {\tt .md} file. In contrast, RigidBodies are
+denoted by their membership and index inside a particular molecule:
+[MoleculeName]\_RB\_[index] (the contents inside the brackets depend
+on the specifics of the simulation). The names of rigid bodies are
+generated automatically. For example, the name of the first rigid
+body in a DMPC molecule is DMPC\_RB\_0.
 \begin{figure}
 \centering
-\includegraphics[width=3in]{heirarchy.eps}
-\caption[Class heirarchy for StuntDoubles in {\sc oopse}-3.0]{ The
-class heirarchy of StuntDoubles in {\sc oopse}-3.0.
+\includegraphics[width=\linewidth]{heirarchy.eps}
+\caption[Class heirarchy for ojects in {\sc OOPSE}]{ A diagram of
+the class heirarchy.
 \begin{itemize}
 \item A {\bf StuntDouble} is {\it any} object that can be manipulated by the
 integrators and minimizers.
@@ -309,17 +306,10 @@ DirectionalAtom}s which behaves as a single unit.
 \item A {\bf DirectionalAtom} is an atom which has {\it orientational} as well as translational degrees of freedom.
 \item A {\bf RigidBody} is a collection of {\bf Atom}s or {\bf
 DirectionalAtom}s which behaves as a single unit.
-\end{itemize}} \label{oopseFig:heirarchy}
+\end{itemize}
+} \label{oopseFig:heirarchy}
 \end{figure}
 
-Every Molecule, Atom and DirectionalAtom in {\sc OOPSE} have their
-own names which are specified in the {\tt .md} file. In contrast,
-RigidBodies are denoted by their membership and index inside a
-particular molecule: [MoleculeName]\_RB\_[index] (the contents
-inside the brackets depend on the specifics of the simulation). The
-names of rigid bodies are generated automatically. For example, the
-name of the first rigid body in a DMPC molecule is DMPC\_RB\_0.
-
 \section{\label{appendixSection:syntax}Syntax of the Select Command}
 
 The most general form of the select command is: {\tt select {\it
