ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/applications/dump2Xyz/Dump2XYZ.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/applications/dump2Xyz/Dump2XYZ.cpp (file contents):
Revision 2764 by tim, Tue May 23 18:46:11 2006 UTC vs.
Revision 3115 by chuckv, Tue Jan 16 22:17:27 2007 UTC

# Line 68 | Line 68 | int main(int argc, char* argv[]){
68    
69    gengetopt_args_info args_info;
70    std::string dumpFileName;
71  std::string mdFileName;
71    std::string xyzFileName;
72    
73    //parse the command line option
# Line 84 | Line 83 | int main(int argc, char* argv[]){
83      exit(1);
84    }
85    
87  mdFileName = dumpFileName;
88  mdFileName = mdFileName.substr(0, mdFileName.rfind(".")) + ".md";
89
86    if (args_info.output_given){
87      xyzFileName = args_info.output_arg;
88    } else {
# Line 96 | Line 92 | int main(int argc, char* argv[]){
92    
93    //parse md file and set up the system
94    SimCreator creator;
95 <  SimInfo* info = creator.createSim(mdFileName, false);
100 <  
101 <  
95 >  SimInfo* info = creator.createSim(dumpFileName, false);
96    
97 +
98    //create visitor list
99    CompositeVisitor* compositeVisitor = new CompositeVisitor();
100      
# Line 175 | Line 170 | int main(int argc, char* argv[]){
170      
171    //create xyzVisitor
172    XYZVisitor* xyzVisitor;
173 +
174    if (args_info.selection_given) {
175      xyzVisitor = new XYZVisitor(info, args_info.selection_arg);
176    } else {
177      xyzVisitor = new XYZVisitor(info);
178    }
179 +
180 +  if(args_info.printPosOnly_flag){
181 +    bool posOnly = true;
182 +    xyzVisitor->setPosOnly(posOnly);
183 +  }
184 +
185    compositeVisitor->addVisitor(xyzVisitor, 200);
186    
187    std::cout << compositeVisitor->toString();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines