ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-2.0/src/visitors/ZconsVisitor.hpp
(Generate patch)

Comparing branches/new_design/OOPSE-2.0/src/visitors/ZconsVisitor.hpp (file contents):
Revision 1910 by tim, Wed Dec 1 20:05:49 2004 UTC vs.
Revision 1911 by tim, Mon Jan 10 18:05:45 2005 UTC

# Line 1 | Line 1
1 < #ifndef _ZCONS_VISITOR_H_
2 < #define _ZCONS_VISITOR_H_
1 > #ifndef VISITORS_ZCONSVISITOR_HPP
2 > #define VISITORS_ZCONSVISITOR_HPP
3  
4 #include "visitors/BaseVisitor.hpp"
4   #include "io/ZConsReader.hpp"
5 + #include "primitives/RigidBody.hpp"
6 + #include "visitors/BaseVisitor.hpp"
7   #include "visitors/AtomData.hpp"
7 #include "constraints/ZconsData.hpp"
8  
9 #include "primitives/RigidBody.hpp"
9  
11 enum ZConsState{zsFixed, zsMoving};
10  
11   namespace oopse {
12 <    
12 >
13 > /**
14 > * @class ZConsVisitor
15 > * @note
16 > */
17   class ZConsVisitor : public BaseVisitor{
18 <  public:
18 >    public:
19 >        enum ZConsState{zsFixed = 0, zsMoving};
20  
21 <    
22 <    ZConsVisitor(SimInfo* info);
20 <    ~ZConsVisitor();
21 <    
22 <    virtual void visit(Atom* atom);
23 <    virtual void visit(DirectionalAtom* datom);
24 <    virtual void visit(RigidBody* rb);
25 <    
26 <    virtual void update();
27 <    
28 <    bool haveZconsMol() {return haveZcons;}
21 >        ZConsVisitor(SimInfo* info);
22 >        ~ZConsVisitor();
23  
24 <    virtual const std::string toString();
25 <  protected:
26 <    void internalVisit(StuntDouble* sd, const std::string& prefix);
27 <    bool isZconstraint(int index, std::string& prefix);
28 <    void getZconsPos(double time);
29 <    
30 <  private:  
31 <    std::vector<Molecule*> zconsMol;
32 <    std::vector<double> zconsPos;
33 <    std::map<int, ZConsState> zconsState;
34 <    bool haveZcons;
35 <    double zconsTol;
36 <    double zconsTime;
37 <    std::string zconsFilename;
38 <    ZConsReader* zconsReader;
39 <    SimInfo* info;
24 >        virtual void visit(Atom* atom);
25 >        virtual void visit(DirectionalAtom* datom);
26 >        virtual void visit(RigidBody* rb);
27 >
28 >        virtual void update();
29 >
30 >        bool haveZconsMol() {return zmolStates_.empty(); }
31 >
32 >        virtual const std::string toString();
33 >        protected:
34 >        void internalVisit(StuntDouble* sd, const std::string& prefix);
35 >        bool isZconstraint(int index, std::string& prefix);
36 >        void readZconsFile(double time);
37 >
38 >    private:  
39 >        std::vector<double> zconsPos;
40 >        std::map<int, ZConsState> zmolStates_;
41 >        double zconsTol_;
42 >        double zconsTime_;
43 >        std::string zconsFilename_;
44 >        ZConsReader* zconsReader_;
45 >        SimInfo* info_;
46 >        Snapshot* currSnapshot_;
47 >        std::map<int, int> zatomToZmol_;
48   };
49  
50   }//namespace oopse

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines