ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/BaseVisitor.hpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/BaseVisitor.hpp (file contents):
Revision 1118 by tim, Mon Apr 19 03:52:27 2004 UTC vs.
Revision 1119 by tim, Mon Apr 19 17:44:48 2004 UTC

# Line 1 | Line 1
1   #ifndef _BASEVISITOR_H_
2   #define _BASEVISITOR_H_
3 <
3 > #include <iostream>
4   #include <string>
5   using namespace std;
6  
# Line 20 | Line 20 | class BaseVisitor{
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 <      sprintf(buffer,"Visitor name: %s", visitorName.c_str());
28 <      sprintf(buffer,"------------------------------------------------------------------\n");
27 >      result += buffer;      
28 >      
29 >      sprintf(buffer, "Visitor name: %s\n", visitorName.c_str());
30 >      result += buffer;      
31  
32 <      return buffer;
32 >      sprintf(buffer, "------------------------------------------------------------------\n");
33 >      result += buffer;      
34 >
35 >      return result;
36      }
37  
38    protected:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines