Changeset 589 in Sophya
- Timestamp:
- Nov 17, 1999, 4:58:23 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaProg/Tests/scanppf.cc
r583 r589 14 14 15 15 if (narg < 2) { 16 cerr << " Usage: scanppf filename \n " << endl;16 cerr << " Usage: scanppf filename [s]\n " << endl; 17 17 exit(0); 18 18 } … … 20 20 try { 21 21 string flnm = arg[1]; 22 bool seq=false; 23 if (narg > 2) seq=true; 22 24 PPersist* op = NULL; 23 25 cout << " Opening PPF file " << flnm << endl; … … 30 32 if (op) delete op; 31 33 } 32 else for(int i=0; i<nt; i++) { 33 cout << ">>> TagNum= " << i << " TagName= " << s.GetTagName(i) << endl; 34 s.GotoTagNum(i); 35 op = s.ReadObject(); 36 cout << " Object Type " << typeid(*op).name() << endl; 37 if (op) delete op; 34 else if (!seq) { 35 for(int i=0; i<nt; i++) { 36 cout << ">>> TagNum= " << i << " TagName= " << s.GetTagName(i) << endl; 37 s.GotoTagNum(i); 38 op = s.ReadObject(); 39 cout << " Object Type " << typeid(*op).name() << endl; 40 if (op) delete op; 41 } 42 } else { 43 while (1) { 44 op = s.ReadObject(); 45 cout << " Object Type " << typeid(*op).name() << endl; 46 if (op) delete op; 47 } 38 48 } 39 49 }
Note:
See TracChangeset
for help on using the changeset viewer.