7 /***********************************************************************/
12 FileOutput(){ m = MothurOut::getInstance(); }
13 virtual ~FileOutput(){};
15 virtual void initFile(string) = 0;
16 virtual void initFile(string, vector<string>) = 0;
17 virtual void output(int, vector<double>) = 0;
18 virtual void output(vector<double>) = 0;
19 virtual void resetFile() = 0;
20 virtual string getFileName() = 0;
28 /***********************************************************************/
30 class ThreeColumnFile : public FileOutput {
33 ThreeColumnFile(string n) : FileOutput(), inName(n), counter(0), outName(n + ".temp") { };
35 void initFile(string);
36 void output(int, vector<double>);
38 string getFileName() { return inName; };
40 void initFile(string, vector<string>){};
41 void output(vector<double>) {};
52 /***********************************************************************/
53 class OneColumnFile : public FileOutput {
57 OneColumnFile(string n) : inName(n), counter(0), outName(n + ".temp") {};
59 void output(int, vector<double>);
60 void initFile(string);
62 string getFileName() { return inName; };
64 void initFile(string, vector<string>) {};
65 void output(vector<double>) {};
76 /***********************************************************************/
77 class SharedOneColumnFile : public FileOutput {
81 SharedOneColumnFile(string n) : inName(n), counter(0), outName(n + ".temp") {};
82 ~SharedOneColumnFile();
83 void output(int, vector<double>);
84 void initFile(string);
86 string getFileName() { return inName; };
88 void initFile(string, vector<string>) {};
89 void output(vector<double>) {};
101 /***********************************************************************/
103 class SharedThreeColumnFile : public FileOutput {
106 SharedThreeColumnFile(string n, string groups) : FileOutput(), groupLabel(groups), inName(n), counter(0), numGroup(1), outName(n + ".temp") { };
107 ~SharedThreeColumnFile();
108 void initFile(string);
109 void output(int, vector<double>);
111 string getFileName() { return inName; };
114 void initFile(string, vector<string>) {};
115 void output(vector<double>) {};
118 string inName, groupLabel;
122 int counter, numGroup;
125 /***********************************************************************/
126 //used by parsimony, unifrac.weighted and unifrac.unweighted
127 class ColumnFile : public FileOutput {
130 ColumnFile(string n, string i) : FileOutput(), iters(i), inName(n), counter(0), outName(n + ".temp") {};
133 //to make compatible with parent class
134 void output(int, vector<double>){};
135 void initFile(string){};
137 void initFile(string, vector<string>);
138 void output(vector<double>);
140 string getFileName() { return inName; };