X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=readtree.h;fp=readtree.h;h=15597bafbfd64eb88c2f4304aff0fb9b78ac60ea;hb=9651e8e7172d86707b34af15e95ec60ad4c3c3f9;hp=250b1db898546981b0969b7323095bbedd35a875;hpb=a85da7303079652b569291eacb9c2964060e072b;p=mothur.git diff --git a/readtree.h b/readtree.h index 250b1db..15597ba 100644 --- a/readtree.h +++ b/readtree.h @@ -27,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); @@ -36,6 +36,7 @@ class ReadTree { GlobalData* globaldata; int numNodes, numLeaves; + }; /****************************************************************************/ @@ -43,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. + }; /****************************************************************************/