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