1 #ifndef datavector_h
2 #define datavector_h
3 
4 #include "mothurout.h"
5 #include "utils.hpp"
6 
7 /* This class is parent to listvector, ordervector, rabundvector, sabundvector, sharedordervector, sharedrabundvector, sharedsabundvector.
8 	The child classes all contain OTU information in different forms. */
9 
10 class SharedSAbundVector;
11 class SharedRAbundVectors;
12 class SharedCLRVector;
13 class SharedCLRVectors;
14 class RAbundVector;
15 class RAbundFloatVector;
16 class SAbundVector;
17 class OrderVector;
18 class SharedListVector;
19 class SharedOrderVector;
20 class GroupMap;
21 
22 class DataVector {
23 
24 public:
DataVector()25 	DataVector(){ m = MothurOut::getInstance(); }
DataVector(string l)26 	DataVector(string l) : label(l) { m = MothurOut::getInstance();};
DataVector(const DataVector & dv)27     DataVector(const DataVector& dv) : label(dv.label){ m = MothurOut::getInstance();}
DataVector(ifstream &)28 	DataVector(ifstream&) {m = MothurOut::getInstance();}
DataVector(ifstream &,GroupMap *)29 	DataVector(ifstream&, GroupMap*){m = MothurOut::getInstance();}
~DataVector()30 	virtual ~DataVector(){};
31 
32 	virtual int size() = 0;
33     virtual void clear() = 0;
34 
35     virtual RAbundVector getRAbundVector() = 0;
36 	virtual SAbundVector getSAbundVector() = 0;
37     virtual OrderVector getOrderVector(map<string,int>* hold = NULL) = 0;
38     virtual void resize(int) = 0;
39 
print(ostream &,map<string,int> &)40     virtual void print(ostream&, map<string, int>&) {}
print(ostream &,bool)41     virtual void print(ostream&, bool) { m->mothurOut("[ERROR]: no print function\n"); }
printHeaders(ostream &)42     virtual void printHeaders(ostream&) {};
print(ostream &,bool &)43     virtual void print(ostream&, bool&) {}
print(ostream &)44     virtual void print(ostream&) {}
45 
setLabel(string l)46     void setLabel(string l)		{	label = l;			}
getLabel()47     string getLabel()			    {	return label;		}
48 
49 
50 protected:
51 	string label;
52 	MothurOut* m;
53     Utils util;
54 
55 };
56 
57 /***********************************************************************/
58 
59 #endif
60