]> git.donarmstrong.com Git - mothur.git/blob - datavector.hpp
created mothurOut class to handle logfiles
[mothur.git] / datavector.hpp
1 #ifndef datavector_h
2 #define datavector_h
3
4
5 #include "mothur.h"
6 #include "mothurout.h"
7
8 /* This class is parent to listvector, ordervector, rabundvector, sabundvector, sharedordervector, sharedrabundvector, sharedsabundvector. 
9         The child classes all contain OTU information in different forms. */
10         
11
12 class RAbundVector;
13 class SAbundVector;
14 class OrderVector;
15 class SharedListVector;
16 class SharedOrderVector;
17 class SharedSAbundVector;
18 class SharedRAbundVector;
19
20 class DataVector {
21         
22 public:
23         DataVector(){ m = MothurOut::getInstance(); }// : maxRank(0), numBins(0), numSeqs(0){};
24         DataVector(string l) : label(l) {};
25         DataVector(const DataVector& dv) : label(dv.label){};//, maxRank(dv.maxRank), numBins(dv.numBins), numSeqs(dv.numSeqs) {};
26         DataVector(ifstream&);
27         virtual ~DataVector(){};
28         
29 //      virtual int getNumBins()        {       return numBins;         }
30 //      virtual int getNumSeqs()        {       return numSeqs;         }
31 //      virtual int getMaxRank()        {       return maxRank;         }
32         
33         virtual void resize(int) = 0;
34         virtual int size()      = 0;
35         virtual void print(ostream&) = 0;
36         
37         void setLabel(string l)         {       label = l;                      }
38         string getLabel()                       {       return label;           }
39
40         virtual RAbundVector getRAbundVector() = 0;
41         virtual SAbundVector getSAbundVector() = 0;
42         virtual OrderVector getOrderVector(map<string,int>* hold = NULL) = 0;
43         
44 protected:
45         string label;
46         MothurOut* m;
47 //      int maxRank;
48 //      int numBins;
49 //      int numSeqs;    
50 };
51
52 /***********************************************************************/
53
54 #endif