X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=readtree.h;h=8a692432c7cda431c6f5d73f409a0fa8e9152671;hp=0c368337a85954a94750fdba504103cccbe9057f;hb=615301e57c25e241356a9c2380648d117709458d;hpb=260ae19c36cb11a53ddc5a75b5e507f8dd8b31d6 diff --git a/readtree.h b/readtree.h index 0c36833..8a69243 100644 --- a/readtree.h +++ b/readtree.h @@ -10,8 +10,8 @@ */ #include "mothur.h" -#include "globaldata.hpp" #include "tree.h" +#include "counttable.h" #define MAX_LINE 513 #define SKIPLINE(f,c) {while((c=f.get())!=EOF && ((c) != '\n')){}} @@ -25,13 +25,17 @@ class ReadTree { ReadTree(); virtual ~ReadTree() {}; - virtual int read() = 0; + virtual int read(CountTable*) = 0; int readSpecialChar(istream&, char, string); int readNodeChar(istream& f); float readBranchLength(istream& f); + + vector getTrees() { return Trees; } + int AssembleTrees(); protected: - GlobalData* globaldata; + vector Trees; + CountTable* ct; int numNodes, numLeaves; MothurOut* m; @@ -45,13 +49,13 @@ class ReadNewickTree : public ReadTree { public: ReadNewickTree(string file) : treeFile(file) { m->openInputFile(file, filehandle); readOk = 0; } ~ReadNewickTree() {}; - int read(); + int read(CountTable*); private: Tree* T; - int readNewickInt(istream&, int&, Tree*); - int readTreeString(); - void nexusTranslation(); + int readNewickInt(istream&, int&, Tree*, CountTable*); + int readTreeString(CountTable*); + string nexusTranslation(CountTable*); ifstream filehandle; string treeFile; string holder;