ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-3.0/src/visitors/OtherVisitor.cpp
(Generate patch)

Comparing:
trunk/OOPSE-3.0/src/visitors/OtherVisitor.cpp (file contents), Revision 1490 by gezelter, Fri Sep 24 04:16:43 2004 UTC vs.
branches/new_design/OOPSE-3.0/src/visitors/OtherVisitor.cpp (file contents), Revision 1701 by tim, Wed Nov 3 16:08:43 2004 UTC

# Line 1 | Line 1
1 < #include "OtherVisitor.hpp"
2 < #include "DirectionalAtom.hpp"
3 < #include "RigidBody.hpp"
4 < #include "Molecule.hpp"
5 < #include "SimInfo.hpp"
1 > #include "visitors/OtherVisitor.hpp"
2 > #include "primitives/DirectionalAtom.hpp"
3 > #include "primitives/RigidBody.hpp"
4 > #include "primitives/Molecule.hpp"
5 > #include "brains/SimInfo.hpp"
6 >
7 > namespace oopse {
8 >
9   //----------------------------------------------------------------------------//
10   void IgnoreVisitor::visit(Atom* atom){
11    if(isIgnoreType(atom->getType()))
# Line 38 | Line 41 | void IgnoreVisitor::internalVisit(StuntDouble* sd){
41  
42   void IgnoreVisitor::internalVisit(StuntDouble* sd){
43    GenericData* data;
44 <  data = sd->getProperty("IGNORE");
44 >  data = sd->getPropertyByName("IGNORE");
45  
46    //if this stuntdoulbe is already marked as ignore just skip it
47    if (data == NULL){
# Line 100 | Line 103 | void WrappingVisitor::internalVisit(StuntDouble* sd){
103    AtomInfo* atomInfo;
104    vector<AtomInfo*>::iterator i;
105  
106 <  data = sd->getProperty("ATOMDATA");
106 >  data = sd->getPropertyByName("ATOMDATA");
107    if(data != NULL){
108      atomData = dynamic_cast<AtomData*>(data);  
109      if(atomData == NULL)
# Line 171 | Line 174 | void ReplicateVisitor::internalVisit(StuntDouble* sd){
174    IntVec3 dir;
175    
176    //if there is not atom data, just skip it
177 <  data = sd->getProperty("ATOMDATA");
177 >  data = sd->getPropertyByName("ATOMDATA");
178    if(data != NULL){
179      atomData = dynamic_cast<AtomData*>(data);  
180      if(atomData == NULL)
# Line 270 | Line 273 | void XYZVisitor::internalVisit(StuntDouble* sd){
273    char buffer[1024];
274    
275    //if there is not atom data, just skip it
276 <  data = sd->getProperty("ATOMDATA");
276 >  data = sd->getPropertyByName("ATOMDATA");
277    if(data != NULL){
278      atomData = dynamic_cast<AtomData*>(data);  
279      if(atomData == NULL)
# Line 306 | Line 309 | bool XYZVisitor::isIgnore(StuntDouble* sd){
309   bool XYZVisitor::isIgnore(StuntDouble* sd){
310    GenericData* data;
311    
312 <  data = sd->getProperty("IGNORE");
312 >  data = sd->getPropertyByName("IGNORE");
313    return data ==NULL ? false : true;
314   }
315  
# Line 361 | Line 364 | void PrepareVisitor::internalVisit(Atom * atom){
364    AtomData* atomData;
365  
366    //if visited property is  existed, remove it
367 <  data = atom->getProperty("VISITED");
367 >  data = atom->getPropertyByName("VISITED");
368    if(data != NULL){
369      atom->removeProperty("VISITED");  
370    }
371  
372    //remove atomdata
373 <  data = atom->getProperty("ATOMDATA");
373 >  data = atom->getPropertyByName("ATOMDATA");
374    if(data != NULL){
375      atomData = dynamic_cast<AtomData*>(data);  
376      if(atomData != NULL)
# Line 383 | Line 386 | void PrepareVisitor::internalVisit(RigidBody * rb){
386    vector<Atom*>::iterator atomIter;
387    
388    //if visited property is  existed, remove it
389 <  data = rb->getProperty("VISITED");
389 >  data = rb->getPropertyByName("VISITED");
390    if(data != NULL){
391      rb->removeProperty("VISITED");  
392    }
393  
394    //remove atomdata
395 <  data = rb->getProperty("ATOMDATA");
395 >  data = rb->getPropertyByName("ATOMDATA");
396    if(data != NULL){
397      atomData = dynamic_cast<AtomData*>(data);  
398      if(atomData != NULL)
# Line 448 | Line 451 | void WaterTypeVisitor:: visit(RigidBody* rb){
451      myAtoms = rb->getAtoms();    
452      for(atomIter = myAtoms.begin(); atomIter != myAtoms.end(); ++atomIter){
453  
454 <      data = (*atomIter)->getProperty("ATOMDATA");
454 >      data = (*atomIter)->getPropertyByName("ATOMDATA");
455        if(data != NULL){
456          atomData = dynamic_cast<AtomData*>(data);  
457          if(atomData == NULL)
# Line 490 | Line 493 | const string WaterTypeVisitor:: toString(){
493    return result;
494   }
495  
496 +
497 + }//namespace oopse

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines