X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=datavector.hpp;h=e6c839d4772d0586457a9913df2d9e889db60e00;hb=bd27c2b0612942815b7417c79f7ee41f669a2a34;hp=4ddb1aa6fb054dfcf7d127a6d4b8dcd7998169d6;hpb=20a2d0350a737a434c89f303662d64a8eeea7b05;p=mothur.git diff --git a/datavector.hpp b/datavector.hpp index 4ddb1aa..e6c839d 100644 --- a/datavector.hpp +++ b/datavector.hpp @@ -1,25 +1,33 @@ #ifndef datavector_h #define datavector_h -using namespace std; -#include -#include -#include -#include +#include "mothur.h" +#include "mothurout.h" + +/* This class is parent to listvector, ordervector, rabundvector, sabundvector, sharedordervector, sharedrabundvector, sharedsabundvector. + The child classes all contain OTU information in different forms. */ + class RAbundVector; class SAbundVector; class OrderVector; +class SharedListVector; +class SharedOrderVector; +class SharedSAbundVector; +class SharedRAbundVector; +class SharedRAbundFloatVector; +class GroupMap; class DataVector { public: - DataVector(){};// : maxRank(0), numBins(0), numSeqs(0){}; + DataVector(){ m = MothurOut::getInstance(); }// : maxRank(0), numBins(0), numSeqs(0){}; DataVector(string l) : label(l) {}; DataVector(const DataVector& dv) : label(dv.label){};//, maxRank(dv.maxRank), numBins(dv.numBins), numSeqs(dv.numSeqs) {}; DataVector(ifstream&); - ~DataVector(){}; + DataVector(ifstream&, GroupMap*); + virtual ~DataVector(){}; // virtual int getNumBins() { return numBins; } // virtual int getNumSeqs() { return numSeqs; } @@ -28,16 +36,19 @@ public: virtual void resize(int) = 0; virtual int size() = 0; virtual void print(ostream&) = 0; + virtual void printHeaders(ostream&) {}; + virtual void clear() = 0; void setLabel(string l) { label = l; } string getLabel() { return label; } - //virtual RAbundVector getRAbundVector() = 0; + virtual RAbundVector getRAbundVector() = 0; virtual SAbundVector getSAbundVector() = 0; virtual OrderVector getOrderVector(map* hold = NULL) = 0; protected: string label; + MothurOut* m; // int maxRank; // int numBins; // int numSeqs;