]> git.donarmstrong.com Git - mothur.git/blob - readsabundfilecommand.cpp
Initial revision
[mothur.git] / readsabundfilecommand.cpp
1 /*
2  *  readsabundfilecommand.cpp
3  *  Dotur
4  *
5  *  Created by Sarah Westcott on 1/2/09.
6  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
7  *
8  */
9
10 #include "readsabundfilecommand.h"
11
12 //**********************************************************************************************************************
13 ReadSAbundFileCommand::ReadSAbundFileCommand(){
14         try {
15                 globaldata = GlobalData::getInstance();
16                 filename = globaldata->inputFileName;   
17                 read = new ReadPhilFile(filename);
18         }
19         catch(exception& e) {
20                 cout << "Standard Error: " << e.what() << " has occurred in the ReadSAbundFileCommand class Function ReadSAbundFileCommand. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
21                 exit(1);
22         }
23         catch(...) {
24                 cout << "An unknown error has occurred in the ReadSAbundFileCommand class function ReadSAbundFileCommand. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
25                 exit(1);
26         }
27 }
28
29 //**********************************************************************************************************************
30
31 ReadSAbundFileCommand::~ReadSAbundFileCommand(){
32         delete read;
33 }
34
35 //**********************************************************************************************************************
36
37 int ReadSAbundFileCommand::execute(){
38         try {
39                 read->read(&*globaldata); 
40                 return 0;
41         }
42         catch(exception& e) {
43                 cout << "Standard Error: " << e.what() << " has occurred in the ReadSAbundFileCommand class Function execute. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
44                 exit(1);
45         }
46         catch(...) {
47                 cout << "An unknown error has occurred in the ReadSAbundFileCommand class function execute. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
48                 exit(1);
49         }
50 }
51 //**********************************************************************************************************************