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

Comparing trunk/OOPSE/libmdtools/ZconsVisitor.cpp (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 239 | Line 239 | const string ZConsVisitor::toString(){
239  
240   const string ZConsVisitor::toString(){
241    char buffer[65535];
242 <  vector<Molecule*>::iterator molIer;
243 <  sprintf(buffer,"------------------------------------------------------------------\n");
244 <  sprintf(buffer,"Visitor name: %s", visitorName.c_str());
245 <  sprintf(buffer, "number of zconstraint molecule :%d\n", zconsMol.size());
242 >  string result;
243 >  
244 >  sprintf(buffer ,"------------------------------------------------------------------\n");
245 >  result += buffer;
246  
247 <  sprintf(buffer, "zconstraint tolerance = %lf\n", zconsTol);
248 <  sprintf(buffer, "zconstraint sample time = %lf\n", zconsTime);
249 <  sprintf(buffer, "zconstraint output filename = %s\n", zconsFilename.c_str());
247 >  sprintf(buffer ,"Visitor name: %s\n", visitorName.c_str());
248 >  result += buffer;
249 >  
250 >  sprintf(buffer , "number of zconstraint molecule :%d\n", zconsMol.size());
251 >  result += buffer;
252 >
253 >  sprintf(buffer , "zconstraint tolerance = %lf\n", zconsTol);
254 >  result += buffer;
255 >
256 >  sprintf(buffer , "zconstraint sample time = %lf\n", zconsTime);
257 >  result += buffer;
258 >
259 >  sprintf(buffer , "zconstraint output filename = %s\n", zconsFilename.c_str());
260 >  result += buffer;
261    
262    for(size_t i = 0; i < zconsMol.size(); ++i){
263 <    sprintf(buffer,"zconstraint molecule[%d] = \n", zconsMol[i]->getMyIndex());
263 >    sprintf(buffer ,"zconstraint molecule[%d] = \n", zconsMol[i]->getMyIndex());
264 >    result += buffer;
265 >
266    }
267  
268    
269 <  sprintf(buffer,"------------------------------------------------------------------\n");
269 >  sprintf(buffer ,"------------------------------------------------------------------\n");
270 >  result += buffer;
271  
272 <  return buffer;
272 >  return result;
273   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines