ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-3.0/src/visitors/BaseVisitor.hpp
Revision: 1702
Committed: Wed Nov 3 18:00:36 2004 UTC (19 years, 8 months ago) by tim
File size: 1037 byte(s)
Log Message:
ForceFiled get compiled. Still a long way to go ......

File Contents

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

Properties

Name Value
svn:executable *