| Line |  | 
|---|
| 1 | // archtoimain.cc | 
|---|
| 2 | // Eric Aubourg         CEA/DAPNIA/SPP   juillet 1999 | 
|---|
| 3 |  | 
|---|
| 4 | #include <iostream.h> | 
|---|
| 5 | #include <fstream.h> | 
|---|
| 6 | #include <iomanip.h> | 
|---|
| 7 |  | 
|---|
| 8 | #include "archeopsfile.h" | 
|---|
| 9 |  | 
|---|
| 10 | #include "archtoi.h" | 
|---|
| 11 | #include "toimanager.h" | 
|---|
| 12 |  | 
|---|
| 13 | //#include <profiler.h> | 
|---|
| 14 |  | 
|---|
| 15 | #ifdef __MWERKS__ | 
|---|
| 16 | #include <console.h> | 
|---|
| 17 | #endif | 
|---|
| 18 |  | 
|---|
| 19 | using namespace std;  //introduces namespace std | 
|---|
| 20 |  | 
|---|
| 21 | int main(int argc, char** argv) | 
|---|
| 22 | { | 
|---|
| 23 | #ifdef __MWERKS__ | 
|---|
| 24 | argc = ccommand(&argv); | 
|---|
| 25 | #endif | 
|---|
| 26 |  | 
|---|
| 27 |  | 
|---|
| 28 | if (argc != 3) { | 
|---|
| 29 | cerr << "usage: archtoi reqfile datafile" << endl; | 
|---|
| 30 | cerr << "or:    archtoi -h reqfile" << endl; | 
|---|
| 31 | return(-1); | 
|---|
| 32 | } | 
|---|
| 33 |  | 
|---|
| 34 | //   ProfilerInit(collectDetailed, bestTimeBase, 10000, 200); | 
|---|
| 35 |  | 
|---|
| 36 | if (argv[1] == string("-h")) { | 
|---|
| 37 | ArchTOI toi(argv[2]); | 
|---|
| 38 | TOIManager::dumpAvailTOIs(cout); | 
|---|
| 39 | exit(0); | 
|---|
| 40 | } | 
|---|
| 41 |  | 
|---|
| 42 |  | 
|---|
| 43 | try { | 
|---|
| 44 | ArchTOI toi(argv[1]); | 
|---|
| 45 | toi.run(argv[2]); | 
|---|
| 46 | } catch (ArchExc exc) { | 
|---|
| 47 | cerr << exc.Msg() << endl; | 
|---|
| 48 | exit(-1); | 
|---|
| 49 | } | 
|---|
| 50 |  | 
|---|
| 51 | //   ProfilerDump("\pprofiler.data"); | 
|---|
| 52 | return(0); | 
|---|
| 53 | } | 
|---|
| 54 |  | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.