7 * Created by Sarah Westcott on 1/22/09.
8 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
13 #include "globaldata.hpp"
17 #define SKIPLINE(f,c) {while((c=f.get())!=EOF && ((c) != '\n')){}}
21 /****************************************************************************/
26 virtual ~ReadTree() {};
28 virtual int read() = 0;
29 int readSpecialChar(istream&, char, string);
30 int readNodeChar(istream& f);
31 float readBranchLength(istream& f);
34 GlobalData* globaldata;
35 int numNodes, numLeaves;
40 /****************************************************************************/
42 class ReadNewickTree : public ReadTree {
45 ReadNewickTree(string file) : treeFile(file) { openInputFile(file, filehandle); readOk = 0; }
51 int readNewickInt(istream&, int&, Tree*);
53 void nexusTranslation();
57 int readOk; // readOk = 0 means success, readOk = 1 means errors.
61 /****************************************************************************/