]> git.donarmstrong.com Git - mothur.git/blobdiff - readtree.h
added countable class to read and store count file. added count parameter to make...
[mothur.git] / readtree.h
index 3df0e0a5f1312aaf3be2ee1f0c35bc5c93afb695..6b074de839070a86bd3e010bbf222a7ec4011dce 100644 (file)
@@ -9,10 +9,7 @@
  *
  */
 
-using namespace std;
-
 #include "mothur.h"
-#include "globaldata.hpp"
 #include "tree.h"
 
 #define MAX_LINE               513
@@ -25,16 +22,21 @@ class Tree;
 class ReadTree {
        public:
                ReadTree(); 
-               ~ReadTree() {};
+               virtual ~ReadTree() {};
                
-               virtual int read() = 0;
+               virtual int read(TreeMap*) = 0;
                int readSpecialChar(istream&, char, string);
                int readNodeChar(istream& f);
                float readBranchLength(istream& f);
+       
+               vector<Tree*> getTrees() { return Trees; }
+               int AssembleTrees(map<string, string>);
                
        protected:
-               GlobalData* globaldata;
+               vector<Tree*> Trees;
+               TreeMap* treeMap;
                int numNodes, numLeaves;
+               MothurOut* m;
                
                
 };
@@ -44,15 +46,15 @@ class ReadTree {
 class ReadNewickTree : public ReadTree {
        
 public:
-       ReadNewickTree(string file) : treeFile(file) { openInputFile(file, filehandle); readOk = 0; } 
+       ReadNewickTree(string file) : treeFile(file) { m->openInputFile(file, filehandle); readOk = 0; } 
        ~ReadNewickTree() {};
-       int read();
+       int read(TreeMap*);
        
 private:
        Tree* T;
-       int readNewickInt(istream&, int&, Tree*);
-       int readTreeString();
-       void nexusTranslation();
+       int readNewickInt(istream&, int&, Tree*, TreeMap*);
+       int readTreeString(TreeMap*);
+       string nexusTranslation(TreeMap*);
        ifstream filehandle;
        string treeFile;
        string holder;