]> git.donarmstrong.com Git - mothur.git/blob - globaldata.hpp
6070dd7b2cdd6122b78c5833359ce487497fd0e3
[mothur.git] / globaldata.hpp
1 #ifndef GLOBALDATA_HPP
2 #define GLOBALDATA_HPP
3
4 #include "mothur.h"
5 #include "groupmap.h"
6 #include "treemap.h"
7
8 using namespace std;
9
10 class ListVector;
11 class SharedListVector;
12 class SparseMatrix;
13 class FullMatrix;
14 class Tree;
15 class OrderVector;
16 class InputData;
17 class GroupMap;
18 class TreeMap;
19 class SAbundVector;
20
21 class GlobalData {
22 public:
23         static GlobalData* getInstance();
24         ListVector* gListVector;
25         SparseMatrix* gSparseMatrix;
26         InputData* ginput;
27         OrderVector* gorder;
28         ListVector* glist;
29         vector<Tree*> gTree;
30         SharedListVector* gSharedList;
31         SAbundVector* sabund;
32         GroupMap* gGroupmap;
33         FullMatrix* gMatrix;
34         TreeMap* gTreemap;
35         string inputFileName, helpRequest, commandName;
36         bool allLines;
37         vector<string>  Estimators, Groups; //holds estimators to be used
38         set<int> lines; //hold lines to be used
39         set<string> labels; //holds labels to be used
40         
41         string getPhylipFile();
42         string getColumnFile();
43         string getListFile();
44         string getRabundFile();
45         string getSabundFile();
46         string getNameFile();
47         string getGroupFile();
48         string getOrderFile();
49         string getFastaFile();
50         string getTreeFile();
51         string getSharedFile();
52         string getCutOff();
53         string getFormat();
54         string getPrecision();
55         string getMethod();
56         string getFileRoot();
57         string getIters();
58         string getJumble();
59         string getFreq();
60         string getAbund();
61         string getRandomTree();
62         string getGroups();
63
64         void setListFile(string);
65         void setPhylipFile(string);
66         void setColumnFile(string);
67         void setNameFile(string);
68         void setRabundFile(string);
69         void setSabundFile(string);
70         void setFormat(string);
71         void setRandomTree(string);
72         void setGroups(string);
73         void setCalc(string);
74
75         void clear(); 
76         void clearLabels();
77         void clearAbund();
78         
79         void parseGlobalData(string, string);
80                 
81 private:
82         string phylipfile, columnfile, listfile, rabundfile, sabundfile, namefile, groupfile, orderfile, fastafile, treefile, sharedfile, line, label, randomtree, groups;
83         string cutoff, format, precision, method, fileroot, iters, jumble, freq, calc, abund;
84
85         static GlobalData* _uniqueInstance;
86         GlobalData( const GlobalData& ); // Disable copy constructor
87         void operator=( const GlobalData& ); // Disable assignment operator
88         GlobalData();
89         ~GlobalData();
90         void reset();   //clears all non filename parameters
91         
92         
93         
94 };
95
96 #endif