1 #include "globaldata.hpp"
3 #include "sparsematrix.hpp"
5 /*******************************************************/
7 /******************************************************/
8 GlobalData* GlobalData::getInstance() {
9 if( _uniqueInstance == 0) {
10 _uniqueInstance = new GlobalData();
12 return _uniqueInstance;
14 /*******************************************************/
16 /******************************************************/
17 // These functions give you the option parameters of the commands
18 string GlobalData::getPhylipFile() { return phylipfile; }
19 string GlobalData::getColumnFile() { return columnfile; }
20 string GlobalData::getListFile() { return listfile; }
21 string GlobalData::getRabundFile() { return rabundfile; }
22 string GlobalData::getSabundFile() { return sabundfile; }
23 string GlobalData::getNameFile() { return namefile; }
24 string GlobalData::getGroupFile() { return groupfile; }
25 string GlobalData::getOrderFile() { return orderfile; }
26 string GlobalData::getTreeFile() { return treefile; }
27 string GlobalData::getSharedFile() { return sharedfile; }
28 string GlobalData::getFastaFile() { return fastafile; }
29 string GlobalData::getFormat() { return format; }
30 string GlobalData::getCandidateFile() { return candidatefile; }
33 void GlobalData::setListFile(string file) { listfile = file; inputFileName = file; }
34 void GlobalData::setFastaFile(string file) { fastafile = file; inputFileName = file; }
35 void GlobalData::setTreeFile(string file) { treefile = file; inputFileName = file; }
36 void GlobalData::setCandidateFile(string file) { candidatefile = file; }
37 void GlobalData::setRabundFile(string file) { rabundfile = file; inputFileName = file; }
38 void GlobalData::setSabundFile(string file) { sabundfile = file; inputFileName = file; }
39 void GlobalData::setPhylipFile(string file) { phylipfile = file; inputFileName = file; }
40 void GlobalData::setColumnFile(string file) { columnfile = file; inputFileName = file; }
41 void GlobalData::setGroupFile(string file) { groupfile = file; }
42 void GlobalData::setSharedFile(string file) { sharedfile = file; inputFileName = file; }
43 void GlobalData::setNameFile(string file) { namefile = file; }
44 void GlobalData::setOrderFile(string file) { orderfile = file; }
45 void GlobalData::setFormat(string Format) { format = Format; }
48 /*******************************************************/
50 /******************************************************/
51 GlobalData::GlobalData() {
52 //option definitions should go here...
57 /*******************************************************/
59 /******************************************************/
60 void GlobalData::clear() {
61 //option definitions should go here...
75 /*******************************************************/
77 /******************************************************/
78 void GlobalData::newRead() {
86 labels.clear(); lines.clear(); Groups.clear();
91 cout << "Standard Error: " << e.what() << " has occurred in the GlobalData class Function newRead. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
95 cout << "An unknown error has occurred in the GlobalData class function newRead. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
100 //******************************************************/
102 /******************************************************/
103 GlobalData::~GlobalData() {
105 if(gListVector != NULL) { delete gListVector; }
106 if(gSparseMatrix != NULL) { delete gSparseMatrix; }
107 if(gorder != NULL) { delete gorder; }
109 /*******************************************************/
111 /*******************************************************/