ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/tengDissertation/Appendix.tex
(Generate patch)

Comparing trunk/tengDissertation/Appendix.tex (file contents):
Revision 2827 by tim, Thu Jun 8 20:05:53 2006 UTC vs.
Revision 2831 by tim, Thu Jun 8 21:02:53 2006 UTC

# Line 179 | Line 179 | class IntegratorFactory {
179    public:
180      typedef std::map<string, IntegratorCreator*> CreatorMapType;
181  
182 <    bool registerIntegrator(IntegratorCreator* creator);
182 >    bool registerIntegrator(IntegratorCreator* creator) {
183 >      return creatorMap_.insert(creator->getIdent(), creator).second;
184 >    }
185  
186 <    Integrator* createIntegrator(const string& id, SimInfo* info);
186 >    Integrator* createIntegrator(const string& id, SimInfo* info) {
187 >      Integrator* result = NULL;
188 >      CreatorMapType::iterator i = creatorMap_.find(id);
189 >      if (i != creatorMap_.end()) {
190 >        result = (i->second)->create(info);
191 >      }
192 >      return result;
193 >    }
194  
195    private:
196      CreatorMapType creatorMap_;
197   };
189
190 \end{lstlisting}
191
192 \begin{lstlisting}[float,caption={[The implementation of Factory pattern (II)].},label={appendixScheme:factoryDeclarationImplementation}]
193
194 bool IntegratorFactory::unregisterIntegrator(const string& id) {
195  return creatorMap_.erase(id) == 1;
196 }
197
198 Integrator* IntegratorFactory::createIntegrator(const string& id,
199                                                SimInfo* info) {
200  CreatorMapType::iterator i = creatorMap_.find(id);
201  if (i != creatorMap_.end()) {
202    return (i->second)->create(info);
203  } else {
204    return NULL;
205  }
206 }
207
198   \end{lstlisting}
199 + \begin{lstlisting}[float,caption={[The implementation of Factory pattern (III)]Souce code of creator classes.},label={appendixScheme:integratorCreator}]
200  
210 \begin{lstlisting}[float,caption={[The implementation of Factory pattern (III)].},label={appendixScheme:integratorCreator}]
211
201   class IntegratorCreator {
202    public:
203      IntegratorCreator(const string& ident) : ident_(ident) {}
# Line 290 | Line 279 | class RigidBody: public StuntDouble {
279   };
280  
281   \end{lstlisting}
282 +
283   \section{\label{appendixSection:concepts}Concepts}
284  
285   OOPSE manipulates both traditional atoms as well as some objects
286   that {\it behave like atoms}.  These objects can be rigid
287   collections of atoms or atoms which have orientational degrees of
288 < freedom.  Here is a diagram of the class heirarchy:
289 <
288 > freedom.  A diagram of the class heirarchy is illustrated in
289 > Fig.~\ref{oopseFig:heirarchy}. Every Molecule, Atom and
290 > DirectionalAtom in {\sc OOPSE} have their own names which are
291 > specified in the {\tt .md} file. In contrast, RigidBodies are
292 > denoted by their membership and index inside a particular molecule:
293 > [MoleculeName]\_RB\_[index] (the contents inside the brackets depend
294 > on the specifics of the simulation). The names of rigid bodies are
295 > generated automatically. For example, the name of the first rigid
296 > body in a DMPC molecule is DMPC\_RB\_0.
297   \begin{figure}
298   \centering
299 < \includegraphics[width=3in]{heirarchy.eps}
300 < \caption[Class heirarchy for StuntDoubles in {\sc oopse}-3.0]{ The
301 < class heirarchy of StuntDoubles in {\sc oopse}-3.0.
299 > \includegraphics[width=\linewidth]{heirarchy.eps}
300 > \caption[Class heirarchy for ojects in {\sc OOPSE}]{ A diagram of
301 > the class heirarchy.
302   \begin{itemize}
303   \item A {\bf StuntDouble} is {\it any} object that can be manipulated by the
304   integrators and minimizers.
# Line 309 | Line 306 | DirectionalAtom}s which behaves as a single unit.
306   \item A {\bf DirectionalAtom} is an atom which has {\it orientational} as well as translational degrees of freedom.
307   \item A {\bf RigidBody} is a collection of {\bf Atom}s or {\bf
308   DirectionalAtom}s which behaves as a single unit.
309 < \end{itemize}} \label{oopseFig:heirarchy}
309 > \end{itemize}
310 > } \label{oopseFig:heirarchy}
311   \end{figure}
312  
315 Every Molecule, Atom and DirectionalAtom in {\sc OOPSE} have their
316 own names which are specified in the {\tt .md} file. In contrast,
317 RigidBodies are denoted by their membership and index inside a
318 particular molecule: [MoleculeName]\_RB\_[index] (the contents
319 inside the brackets depend on the specifics of the simulation). The
320 names of rigid bodies are generated automatically. For example, the
321 name of the first rigid body in a DMPC molecule is DMPC\_RB\_0.
322
313   \section{\label{appendixSection:syntax}Syntax of the Select Command}
314  
315   The most general form of the select command is: {\tt select {\it

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines