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

Comparing trunk/OOPSE/libmdtools/ConstraintAlgorithm.cpp (file contents):
Revision 1233 by tim, Thu Jun 3 21:51:55 2004 UTC vs.
Revision 1234 by tim, Fri Jun 4 03:15:31 2004 UTC

# Line 103 | Line 103 | int ConstraintAlgorithm::doConstrainPair(ConstraintPai
103    map<TypeInfo, CallbackFunctor*>::iterator foundResult;
104    CallbackFunctor* functor;
105    
106 <  foundResult = callbackMap.find(typeid(consPair));
106 >  //typeid must operate on deferenced, otherwise it will return the type_info of base class
107 >  foundResult = callbackMap.find(TypeInfo(typeid(*consPair)));
108    if (foundResult != callbackMap.end()){
109      functor = foundResult->second;
110      return (*functor)(consPair);    
# Line 147 | Line 148 | void ConsAlgoFramework::doPreConstraint(){
148   ConsAlgoFramework::~ConsAlgoFramework(){
149    delete ceIter;
150   }
151 +
152   void ConsAlgoFramework::doPreConstraint(){
153    ConstraintElement* consElem;
154    
155    for(ceIter->first(); !ceIter->isEnd(); ceIter->next()){
156      consElem =  ceIter->currentItem();
157      consElem->saveOldState();
158 <  }  
159 < }
158 >  }
159 > }  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines