5 #include "globaldata.hpp"
9 /***********************************************************************/
17 virtual void initFile(string) = 0;
18 virtual void initFile(string, vector<string>) = 0;
19 virtual void output(int, vector<double>) = 0;
20 virtual void output(vector<double>) = 0;
21 virtual void resetFile() = 0;
22 virtual string getFileName() = 0;
25 GlobalData* globaldata;
30 /***********************************************************************/
32 class ThreeColumnFile : public FileOutput {
35 ThreeColumnFile(string n) : FileOutput(), inName(n), counter(0), outName(getPathName(n) + ".temp." + getSimpleName(n)) { };
37 void initFile(string);
38 void output(int, vector<double>);
40 string getFileName() { return inName; };
42 void initFile(string, vector<string>){};
43 void output(vector<double>) {};
54 /***********************************************************************/
55 class OneColumnFile : public FileOutput {
59 OneColumnFile(string n) : inName(n), counter(0), outName(getPathName(n) + ".temp." + getSimpleName(n)) {};
61 void output(int, vector<double>);
62 void initFile(string);
64 string getFileName() { return inName; };
66 void initFile(string, vector<string>) {};
67 void output(vector<double>) {};
78 /***********************************************************************/
79 class SharedOneColumnFile : public FileOutput {
83 SharedOneColumnFile(string n) : inName(n), counter(0), outName(getPathName(n) + ".temp." + getSimpleName(n)) {};
84 ~SharedOneColumnFile();
85 void output(int, vector<double>);
86 void initFile(string);
88 string getFileName() { return inName; };
90 void initFile(string, vector<string>) {};
91 void output(vector<double>) {};
103 /***********************************************************************/
105 class SharedThreeColumnFile : public FileOutput {
108 SharedThreeColumnFile(string n, string groups) : FileOutput(), groupLabel(groups), inName(n), counter(0), numGroup(1), outName(getPathName(n) + ".temp." + getSimpleName(n)) { };
109 ~SharedThreeColumnFile();
110 void initFile(string);
111 void output(int, vector<double>);
113 string getFileName() { return inName; };
116 void initFile(string, vector<string>) {};
117 void output(vector<double>) {};
120 string inName, groupLabel;
124 int counter, numGroup;
127 /***********************************************************************/
129 class ColumnFile : public FileOutput {
132 ColumnFile(string n) : FileOutput(), inName(n), counter(0), outName(getPathName(n) + ".temp." + getSimpleName(n)) { globaldata = GlobalData::getInstance(); };
135 //to make compatible with parent class
136 void output(int, vector<double>){};
137 void initFile(string){};
139 void initFile(string, vector<string>);
140 void output(vector<double>);
142 string getFileName() { return inName; };
151 /***********************************************************************/