]> git.donarmstrong.com Git - mothur.git/blob - mothur.cpp
added mothur.h and fixed includes in many files
[mothur.git] / mothur.cpp
1 /*
2  *  interface.cpp
3  *  
4  *
5  *  Created by Pat Schloss on 8/14/08.
6  *  Copyright 2008 Patrick D. Schloss. All rights reserved.
7  *
8  */
9  
10 #include "mothur.h"
11 #include "engine.hpp"
12 #include "globaldata.hpp"
13
14 using namespace std;
15
16 GlobalData* GlobalData::_uniqueInstance = 0;
17
18 int main(int argc, char *argv[]){
19         try {
20         //      srand(54321);
21                 srand( (unsigned)time( NULL ) );
22
23                 Engine* dotur;
24                 bool bail = 0;
25
26                 if(argc>1){
27                         dotur = new BatchEngine(argv[1]);
28                 }
29                 else{
30                         dotur = new InteractEngine();           
31                 }
32
33                 while(bail == 0)                {       bail = dotur->getInput();                       }
34         
35                 delete dotur;
36         
37                 return 0;
38         }
39         catch(exception& e) {
40                 cout << "Standard Error: " << e.what() << " has occurred in the dotur class Function main. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
41                 exit(1);
42         }
43         catch(...) {
44                 cout << "An unknown error has occurred in the dotur class function main. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
45                 exit(1);
46         }
47 }
48