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

Comparing trunk/OOPSE/libmdtools/ConstraintAlgorithm.hpp (file contents):
Revision 1232 by tim, Thu Jun 3 21:51:55 2004 UTC vs.
Revision 1254 by tim, Wed Jun 9 16:16:33 2004 UTC

# Line 14 | Line 14 | class SimInfo;
14   class DistanceConstraintPair;
15   class SimInfo;
16  
17 < enum ConsAlgoStatus{consFail, consSuccess, consAlready, consPairHandlerFail, consElemHandlerFail};
17 > enum ConsAlgoStatus{
18 >  consExceedMaxIter = -4, //can not constrain the bond within maximum iteration
19 >  consPairHandlerFail = -3, //can not found call back functor for constraint pair
20 >  consElemHandlerFail = -2, //can not found callback functor for constraint element
21 >  consFail = -1,  //Constraint Fail
22 >  consSuccess = 0,  //constrain the pair by moving two elements
23 >  consAlready = 1}; //current pair is already constrained, do not need to move the elements
24  
25   ////////////////////////////////////////////////////////////////////////////////
26   //Declaration of ConstraintAlgorithm
# Line 26 | Line 32 | class ConstraintAlgorithm{
32   class ConstraintAlgorithm{
33  
34    public:
35 <    ~ConstraintAlgorithm();
36 <    virtual void doConstrain();
35 >  virtual ~ConstraintAlgorithm();
36 >  virtual void doConstrain();
37  
38      //using RTTI (Run Time Type Information) to dispatch
39      int doConstrainPair(ConstraintPair* consPair);
40      void registerCallback(const TypeInfo& ti, CallbackFunctor* functor);
41      void unRegister(TypeInfo& ti);
42 <    
42 >    bool haveError() { return error;}
43    protected:
44      ConstraintAlgorithm(SimInfo* rhs);
45  
# Line 42 | Line 48 | class ConstraintAlgorithm{
48      ConstraintElementIterator* ceIter;
49  
50      map<TypeInfo, CallbackFunctor*> callbackMap;
51 +
52 +    bool error;
53   };
54  
55   ////////////////////////////////////////////////////////////////////////////////

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines