]> git.donarmstrong.com Git - mothur.git/blobdiff - readtree.h
final commit before testing 1.11
[mothur.git] / readtree.h
index 02b6129b21b0bc960e1d16f9d028baab374bb465..540f80cfa731ab2102fa0a8908737321f73a5cba 100644 (file)
@@ -9,10 +9,7 @@
  *
  */
 
-using namespace std;
-
-#include <string>
-#include <iostream>
+#include "mothur.h"
 #include "globaldata.hpp"
 #include "tree.h"
 
@@ -26,9 +23,9 @@ class Tree;
 class ReadTree {
        public:
                ReadTree(); 
-               ~ReadTree() {};
+               virtual ~ReadTree() {};
                
-               virtual void read() {};
+               virtual int read() = 0;
                int readSpecialChar(istream&, char, string);
                int readNodeChar(istream& f);
                float readBranchLength(istream& f);
@@ -36,6 +33,8 @@ class ReadTree {
        protected:
                GlobalData* globaldata;
                int numNodes, numLeaves;
+               MothurOut* m;
+               
                
 };
 
@@ -44,18 +43,20 @@ class ReadTree {
 class ReadNewickTree : public ReadTree {
        
 public:
-       ReadNewickTree(string file) : treeFile(file) { openInputFile(file, filehandle);  } 
+       ReadNewickTree(string file) : treeFile(file) { openInputFile(file, filehandle); readOk = 0; } 
        ~ReadNewickTree() {};
-       void read();
+       int read();
        
 private:
        Tree* T;
        int readNewickInt(istream&, int&, Tree*);
-       void readTreeString();
+       int readTreeString();
        void nexusTranslation();
        ifstream filehandle;
        string treeFile;
        string holder;
+       int readOk;  // readOk = 0 means success, readOk = 1 means errors.
+       
 };
 
 /****************************************************************************/