ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/BaseVisitor.hpp
Revision: 1119
Committed: Mon Apr 19 17:44:48 2004 UTC (20 years, 2 months ago) by tim
File size: 989 byte(s)
Log Message:
Dump2XYZ is almost working except atoms in rigidbody are double counted

File Contents

# Content
1 #ifndef _BASEVISITOR_H_
2 #define _BASEVISITOR_H_
3 #include <iostream>
4 #include <string>
5 using namespace std;
6
7 class SimInfo;
8 class Atom;
9 class DirectionalAtom;
10 class RigidBody;
11
12 class BaseVisitor{
13 public:
14 virtual ~BaseVisitor() {}
15 virtual void visit(Atom* atom) {}
16 virtual void visit(DirectionalAtom* datom) {}
17 virtual void visit(RigidBody* rb) {}
18
19 virtual void update() {}
20
21 const string& getVisitorName() {return visitorName;}
22 virtual const string toString() {
23 string result;
24 char buffer[65535];
25
26 sprintf(buffer,"------------------------------------------------------------------\n");
27 result += buffer;
28
29 sprintf(buffer, "Visitor name: %s\n", visitorName.c_str());
30 result += buffer;
31
32 sprintf(buffer, "------------------------------------------------------------------\n");
33 result += buffer;
34
35 return result;
36 }
37
38 protected:
39 BaseVisitor() {}
40 string visitorName;
41 };
42
43 #endif

Properties

Name Value
svn:executable *