]> git.donarmstrong.com Git - mothur.git/blob - raredisplay.h
fixed some bugs
[mothur.git] / raredisplay.h
1 #ifndef RAREDISPLAY_H
2 #define RAREDISPLAY_H
3
4 #include "sabundvector.hpp"
5 #include "calculator.h"
6 #include "fileoutput.h"
7 #include "display.h"
8
9 /***********************************************************************/
10
11 class RareDisplay : public Display {
12         
13 public:
14         RareDisplay(Calculator* calc, FileOutput* file) : estimate(calc), output(file), nIters(1),
15                                                         tempInName(getPathName(output->getFileName()) + ".tempin"), tempOutName(getPathName(output->getFileName()) + ".tempout") {};
16         ~RareDisplay()                                  {       delete estimate; delete output;         };
17         void init(string);
18         void reset();
19         void update(SAbundVector*);
20         void update(vector<SharedRAbundVector*> shared, int numSeqs, int numGroupComb);
21         void close();
22         bool isCalcMultiple() { return estimate->getMultiple(); }
23         
24 private:
25         Calculator* estimate;
26         FileOutput* output;
27         string label;
28         int nIters;
29         string tempInName, tempOutName;
30         ifstream tempInFile;
31         ofstream tempOutFile;
32         int renameOk;
33
34 };
35
36 #endif
37