--- trunk/OOPSE/libmdtools/ConstraintAlgorithm.cpp 2004/06/03 21:51:55 1232 +++ trunk/OOPSE/libmdtools/ConstraintAlgorithm.cpp 2004/06/04 03:15:31 1234 @@ -103,7 +103,8 @@ int ConstraintAlgorithm::doConstrainPair(ConstraintPai map::iterator foundResult; CallbackFunctor* functor; - foundResult = callbackMap.find(typeid(consPair)); + //typeid must operate on deferenced, otherwise it will return the type_info of base class + foundResult = callbackMap.find(TypeInfo(typeid(*consPair))); if (foundResult != callbackMap.end()){ functor = foundResult->second; return (*functor)(consPair); @@ -147,11 +148,12 @@ ConsAlgoFramework::~ConsAlgoFramework(){ ConsAlgoFramework::~ConsAlgoFramework(){ delete ceIter; } + void ConsAlgoFramework::doPreConstraint(){ ConstraintElement* consElem; for(ceIter->first(); !ceIter->isEnd(); ceIter->next()){ consElem = ceIter->currentItem(); consElem->saveOldState(); - } -} + } +}