ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/src/visitors/OtherVisitor.hpp
(Generate patch)

Comparing trunk/OOPSE-3.0/src/visitors/OtherVisitor.hpp (file contents):
Revision 1930 by gezelter, Wed Jan 12 22:41:40 2005 UTC vs.
Revision 2097 by tim, Wed Mar 9 17:30:29 2005 UTC

# Line 48 | Line 48
48   #include "visitors/BaseVisitor.hpp"
49   #include "primitives/StuntDouble.hpp"
50   #include "visitors/AtomData.hpp"
51 + #include "selection/SelectionManager.hpp"
52 + #include "selection/SelectionEvaluator.hpp"
53  
52
54   namespace oopse {
55  
56   class SimInfo;
57  
57 //IgnoreVisitor will turn on the ignoring flag of the stuntdouble
58 class IgnoreVisitor : public BaseVisitor{
59  public:
60    IgnoreVisitor() : BaseVisitor() {visitorName = "IgnoreVisitor";}
58  
62    virtual void visit(Atom* atom);
63    virtual void visit(DirectionalAtom* datom);
64    virtual void visit(RigidBody* rb);
65    
66    virtual const std::string toString();
67
68    void addIgnoreType(const std::string& type) {itList.insert(type);}
69    
70  protected:
71    bool isIgnoreType(const std::string& name);
72    void internalVisit(StuntDouble* sd);
73    std::set<std::string> itList; //ignore type list;
74 };
75
76
59   class WrappingVisitor : public BaseVisitor{
60    public:
61      WrappingVisitor(SimInfo* info) : BaseVisitor() {
# Line 112 | Line 94 | class XYZVisitor : public BaseVisitor{
94  
95   class XYZVisitor : public BaseVisitor{
96    public:
115    XYZVisitor(SimInfo* info, bool printDipole = true);
97      
98 +    XYZVisitor(SimInfo* info);
99 +    
100 +    XYZVisitor(SimInfo* info, const std::string& script);
101 +    
102      virtual void visit(Atom* atom);
103      virtual void visit(DirectionalAtom* datom);
104      virtual void visit(RigidBody* rb);
105  
106 +    virtual void update();
107 +
108      virtual const std::string toString();
109      
110      void writeFrame(std::ostream& outStream);    
# Line 125 | Line 112 | class XYZVisitor : public BaseVisitor{
112      
113    protected:
114      void internalVisit(StuntDouble* sd);
115 <    bool isIgnore(StuntDouble* sd);
115 >    bool isSelected(StuntDouble* sd);
116  
117    private:  
118      SimInfo* info;
119 +    SelectionManager seleMan;
120 +    SelectionEvaluator evaluator;
121      std::vector<std::string> frame;
122 <    bool printDipole;
122 >
123   };
124  
125  
# Line 149 | Line 138 | class WaterTypeVisitor : public BaseVisitor{
138      void internalVisit(RigidBody* rb);
139   };
140  
141 < class WaterTypeVisitor : public BaseVisitor{
141 >  class WaterTypeVisitor : public BaseVisitor{
142    public:
143      WaterTypeVisitor() ;
144      virtual void visit(Atom* atom) {}
145      virtual void visit(DirectionalAtom* datom) {}
146      virtual void visit(RigidBody* rb);
147 <
147 >    
148      virtual const std::string toString();
149      
150    private:
151 <    void replaceType(std::string& atomType);
152 <      
151 >    std::string trimmedName(const std::string& atomType);
152 >    
153      std::set<std::string> waterTypeList;
154   };
155  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines