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