]> git.donarmstrong.com Git - mothur.git/blob - globaldata.hpp
working on libshuff
[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         string getStep();
64         string getForm();
65
66         void setListFile(string);
67         void setPhylipFile(string);
68         void setColumnFile(string);
69         void setNameFile(string);
70         void setRabundFile(string);
71         void setSabundFile(string);
72         void setFormat(string);
73         void setRandomTree(string);
74         void setGroups(string);
75         void setCalc(string);
76
77         void clear(); 
78         void clearLabels();
79         void clearAbund();
80         
81         void parseGlobalData(string, string);
82                 
83 private:
84         string phylipfile, columnfile, listfile, rabundfile, sabundfile, namefile, groupfile, orderfile, fastafile, treefile, sharedfile, line, label, randomtree, groups;
85         string cutoff, format, precision, method, fileroot, iters, jumble, freq, calc, abund, step, form;
86
87         static GlobalData* _uniqueInstance;
88         GlobalData( const GlobalData& ); // Disable copy constructor
89         void operator=( const GlobalData& ); // Disable assignment operator
90         GlobalData();
91         ~GlobalData();
92         void reset();   //clears all non filename parameters
93         
94         
95         
96 };
97
98 #endif