ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/OtherVisitor.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/OtherVisitor.cpp (file contents):
Revision 1126 by tim, Tue Apr 20 05:39:38 2004 UTC vs.
Revision 1140 by tim, Wed Apr 28 22:34:02 2004 UTC

# Line 15 | Line 15 | void IgnoreVisitor::visit(RigidBody* rb){
15   }
16  
17   void IgnoreVisitor::visit(RigidBody* rb){
18 <  if(isIgnoreType(rb->getType()))
18 >  vector<Atom*> myAtoms;
19 >  vector<Atom*>::iterator atomIter;
20 >  AtomInfo* atomInfo;
21 >  
22 >  if(isIgnoreType(rb->getType())){
23 >    
24      internalVisit(rb);
25 +
26 +    myAtoms = rb->getAtoms();    
27 +    
28 +    for(atomIter = myAtoms.begin(); atomIter != myAtoms.end(); ++atomIter)
29 +      internalVisit(*atomIter);
30 +
31 +  }
32 +  
33   }
34  
35   bool IgnoreVisitor::isIgnoreType(const string& name){
# Line 44 | Line 57 | const string IgnoreVisitor::toString(){
57    sprintf(buffer ,"------------------------------------------------------------------\n");
58    result += buffer;
59  
60 <  sprintf(buffer ,"Visitor name: %s", visitorName.c_str());
60 >  sprintf(buffer ,"Visitor name: %s\n", visitorName.c_str());
61    result += buffer;
62  
63    sprintf(buffer ,"Visitor Description: ignore  stuntdoubles\n");
# Line 55 | Line 68 | const string IgnoreVisitor::toString(){
68    result += buffer;
69  
70    for(i = itList.begin(); i != itList.end(); ++i){
71 <    sprintf(buffer ,"%s,\t", i->c_str());
71 >    sprintf(buffer ,"%s\t", i->c_str());
72      result += buffer;
73  
74    }
# Line 65 | Line 78 | const string IgnoreVisitor::toString(){
78    sprintf(buffer ,"------------------------------------------------------------------\n");
79    result += buffer;
80  
81 <  return buffer;
81 >  return result;
82   }
83  
84   //----------------------------------------------------------------------------//
# Line 332 | Line 345 | const string XYZVisitor::toString(){
345    sprintf(buffer ,"Visitor name: %s\n", visitorName.c_str());
346    result += buffer;
347  
348 <  sprintf(buffer ,"Visitor Description: assemble the atom data  and output xyz file\n");
348 >  sprintf(buffer ,"Visitor Description: assemble the atom data and output xyz file\n");
349    result += buffer;
350  
351    sprintf(buffer,"------------------------------------------------------------------\n");
# Line 465 | Line 478 | const string WaterTypeVisitor:: toString(){
478    sprintf(buffer ,"------------------------------------------------------------------\n");
479    result += buffer;
480  
481 <  sprintf(buffer ,"Visitor name: %s", visitorName.c_str());
481 >  sprintf(buffer ,"Visitor name: %s\n", visitorName.c_str());
482    result += buffer;
483  
484    sprintf(buffer ,"Visitor Description: Replace the atom type in water model\n");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines