14 |
|
class DistanceConstraintPair; |
15 |
|
class SimInfo; |
16 |
|
|
17 |
< |
enum ConsAlgoStatus{consFail, consSuccess, consAlready, consPairHandlerFail, consElemHandlerFail}; |
17 |
> |
enum ConsAlgoStatus{ |
18 |
> |
consPairHandlerFail = -3, |
19 |
> |
consElemHandlerFail = -2, |
20 |
> |
consFail = -1, |
21 |
> |
consSuccess = 0, |
22 |
> |
consAlready = 1}; |
23 |
|
|
24 |
|
//////////////////////////////////////////////////////////////////////////////// |
25 |
|
//Declaration of ConstraintAlgorithm |
31 |
|
class ConstraintAlgorithm{ |
32 |
|
|
33 |
|
public: |
34 |
< |
~ConstraintAlgorithm(); |
35 |
< |
virtual void doConstrain(); |
34 |
> |
virtual ~ConstraintAlgorithm(); |
35 |
> |
virtual void doConstrain(); |
36 |
|
|
37 |
|
//using RTTI (Run Time Type Information) to dispatch |
38 |
|
int doConstrainPair(ConstraintPair* consPair); |
39 |
|
void registerCallback(const TypeInfo& ti, CallbackFunctor* functor); |
40 |
|
void unRegister(TypeInfo& ti); |
41 |
< |
|
41 |
> |
bool haveError() { return error;} |
42 |
|
protected: |
43 |
|
ConstraintAlgorithm(SimInfo* rhs); |
44 |
|
|
47 |
|
ConstraintElementIterator* ceIter; |
48 |
|
|
49 |
|
map<TypeInfo, CallbackFunctor*> callbackMap; |
50 |
+ |
|
51 |
+ |
bool error; |
52 |
|
}; |
53 |
|
|
54 |
|
//////////////////////////////////////////////////////////////////////////////// |