]> git.donarmstrong.com Git - mothur.git/blobdiff - readtree.h
fixed valid parameters to include shared parameter for read.shared command.
[mothur.git] / readtree.h
index 02b6129b21b0bc960e1d16f9d028baab374bb465..15597bafbfd64eb88c2f4304aff0fb9b78ac60ea 100644 (file)
@@ -11,9 +11,8 @@
 
 using namespace std;
 
-#include <string>
-#include <iostream>
 #include "globaldata.hpp"
+#include "utilities.hpp"
 #include "tree.h"
 
 #define MAX_LINE               513
@@ -28,7 +27,7 @@ class ReadTree {
                ReadTree(); 
                ~ReadTree() {};
                
-               virtual void read() {};
+               virtual int read() = 0;
                int readSpecialChar(istream&, char, string);
                int readNodeChar(istream& f);
                float readBranchLength(istream& f);
@@ -37,6 +36,7 @@ class ReadTree {
                GlobalData* globaldata;
                int numNodes, numLeaves;
                
+               
 };
 
 /****************************************************************************/
@@ -44,18 +44,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.
+       
 };
 
 /****************************************************************************/