ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/ZconsVisitor.hpp
Revision: 1118
Committed: Mon Apr 19 03:52:27 2004 UTC (20 years, 2 months ago) by tim
File size: 990 byte(s)
Log Message:
new implement of quickLate using visitor and composite pattern

File Contents

# User Rev Content
1 tim 1118 #ifndef _ZCONS_VISITOR_H_
2     #define _ZCONS_VISITOR_H_
3    
4     #include "BaseVisitor.hpp"
5     #include "ZConsReader.hpp"
6    
7     enum ZConsState{zsFixed, zsMoving};
8    
9     class ZConsVisitor : public BaseVisitor{
10     public:
11    
12    
13     ZConsVisitor(SimInfo* info);
14     ~ZConsVisitor();
15    
16     virtual void visit(Atom* atom);
17     virtual void visit(DirectionalAtom* datom);
18     virtual void visit(RigidBody* rb);
19    
20     virtual void update();
21    
22     bool haveZconsMol() {return haveZcons;}
23    
24     virtual const string toString();
25     protected:
26     void internalVisit(StuntDouble* sd, const string& prefix);
27     bool isZconstraint(int index, string& prefix);
28     Molecule* findZconsMol(int index);
29     void getZconsPos(double time);
30    
31     private:
32     vector<Molecule*> zconsMol;
33     vector<double> zconsPos;
34     map<int, ZConsState> zconsState;
35     bool haveZcons;
36     double zconsTol;
37     double zconsTime;
38     string zconsFilename;
39     ZConsReader* zconsReader;
40     SimInfo* info;
41     };
42     #endif // _ZCONS_VISITOR_H_
43    

Properties

Name Value
svn:executable *